Random position?

Non-platform specific questions.

Random position?

Postby Jedi Questmaster » Sun Jul 13, 2003 10:25 pm

How do you make an actor appear in a random x or y position?
Image
Jedi Questmaster
 
Posts: 41
Joined: Mon Apr 21, 2003 3:00 am
Location: Here! In San Diego County
Score: 0 Give a positive score

Postby makslane » Mon Jul 14, 2003 3:29 am

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
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Jedi Questmaster » Mon Jul 14, 2003 3:37 pm

OK, thanks
Image
Jedi Questmaster
 
Posts: 41
Joined: Mon Apr 21, 2003 3:00 am
Location: Here! In San Diego County
Score: 0 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron