by makslane » Mon Feb 23, 2004 5:36 pm
Try this:
On Draw Actor, add a Script Editor action:
if(target.y > y) y = y + 5;
else if(target.y < y) y = y - 5;
if(target.x > x) x = x + 5;
else if(target.x < x) x = x - 5;
Factory:
On Create Actor event:
1) Add a "Create Timer" action
2) choose new timer
Name: any name
Time: 12
Type: Periodic
Repeat: Specify quantity
Count: 100 (to create 100 bad guys)
3) Ok, Add, Immediate Action
On Timer event:
1) choose your timer
2) Add "Create Actor" action
Actor: bad guy
Animation: (set if any)
Parent: no parent
Path: no path
Initial Position: 0, 0
Relative to creator: yes
3) Add, Immediate Action
To put your bad guys on a random location:
On Bad Guy Create Actor event:
x = rand(view.width) + view.x;
y = rand(view.height) + view.y;