Page 1 of 1

random appearance

PostPosted: Sat Mar 22, 2008 4:54 pm
by j2graves
I need to have an actor appear in a random place like in kalladdolf's caverunner game. plz help!

Re: random appearance

PostPosted: Sat Mar 22, 2008 5:15 pm
by stevenp
if i knew i would tell you :P

Re: random appearance

PostPosted: Sat Mar 22, 2008 6:30 pm
by Freddy
Do you want it to appear randomly on the y axis or the x axis? (or both)

Re: random appearance

PostPosted: Sat Mar 22, 2008 7:08 pm
by j2graves
on y axis!!!!!

Re: random appearance

PostPosted: Sat Mar 22, 2008 8:24 pm
by Freddy
Simple! :D
Go to create actor -> script editor:
Code: Select all
yscreen = rand(500);

And thats it! You can adjust the number too.

Re: random appearance

PostPosted: Sat Mar 22, 2008 8:28 pm
by Caaz Games
Freddy wrote:Simple! :D
Go to create actor -> script editor:
Code: Select all
yscreen = rand(500);

And thats it! You can adjust the number too.

with this code you can make it pop up like anywhere right? just wondering
Code: Select all
yscreen = rand(500);
xscreen = rand(500);

Re: random appearance

PostPosted: Sat Mar 22, 2008 8:32 pm
by Freddy
Im pretty sure. :)