Page 1 of 1

Random position?

PostPosted: Sun Jul 13, 2003 10:25 pm
by Jedi Questmaster
How do you make an actor appear in a random x or y position?
Image

PostPosted: Mon Jul 14, 2003 3:29 am
by makslane
Use the rand function in Script Editor:

In "Create Actor" event, add a "Script Editor" action:
put code:

x = rand(100);
y = rand(100);

That will make the actor appear in random coordinates between 0 and 100

PostPosted: Mon Jul 14, 2003 3:37 pm
by Jedi Questmaster
OK, thanks
Image