Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Create:
- target=-4;
- Step:
- if target!=-4
- {
- if distance_to_object(obj_enemy)>32
- {
- var dir;
- dir=point_direction(x,y,target.x,target.y);
- x=x+lengthdir_x(4,dir);
- y=y+lengthdir_y(4,dir);
- }
- }
- Collision with obj_enemy:
- if other.target==-4 and target==-4
- {
- target=other.id;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement