Hi i need some help i want to make a npc witch following the "Hero" and when the enemy come near the team-mate gonna shoot at the enemy
My code is:
X position of "team-mate" <= X("Enemy")+100
-Set Global Value T to 1
X position of "team-mate" <= X("Enemy")-100
-Set Global Value T to 1
Y position of "team-mate" <= Y("Enemy")+100
-Set Global Value T to 1
Y position of "team-mate" <= Y("Enemy")-100
-Set Global Value T to 1
X position of "team-mate" > X("Enemy")+100
-Set Global Value T to 0
X position of "team-mate" > X("Enemy")-100
-Set Global Value T to 0
Y position of "team-mate" > Y("Enemy")+100
-Set Global Value T to 0
Y position of "team-mate" > Y("Enemy")-100
-Set Global Value T to 0
Global Value T = 1
+Every 01"-00
-Shoot "Bullet" at speed 100 toward (0,0) from "Team-mate"(at Enemy)
i don't know how to do it correctly..
Thanks in advance
Event 1:
x pos of enemy <+100 x pos of teammate
x pos of enemy >-100 x pos of teammate
y pos of enemy <+100 y pos of teammate
y pos of enemy >-100 y pos of teammate
Then : set alt value T to 1
Event 2:
x pos of enemy >+100 x pos of teammate
x pos of enemy <-100 x pos of teammate
y pos of enemy >+100 y pos of teammate
y pos of enemy <-100 y pos of teammate
Then : set alt value T to 0