random appearance

Talk about making games.

random appearance

Postby j2graves » Sat Mar 22, 2008 4:54 pm

I need to have an actor appear in a random place like in kalladdolf's caverunner game. plz help!
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: random appearance

Postby stevenp » Sat Mar 22, 2008 5:15 pm

if i knew i would tell you :P
User avatar
stevenp
 
Posts: 403
Joined: Sat Dec 22, 2007 12:49 pm
Location: canada, ontario
Score: 16 Give a positive score

Re: random appearance

Postby Freddy » Sat Mar 22, 2008 6:30 pm

Do you want it to appear randomly on the y axis or the x axis? (or both)
Hola
User avatar
Freddy
 
Posts: 548
Joined: Sat Jun 02, 2007 3:42 pm
Location: Why do you want to know?
Score: 14 Give a positive score

Re: random appearance

Postby j2graves » Sat Mar 22, 2008 7:08 pm

on y axis!!!!!
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: random appearance

Postby Freddy » Sat Mar 22, 2008 8:24 pm

Simple! :D
Go to create actor -> script editor:
Code: Select all
yscreen = rand(500);

And thats it! You can adjust the number too.
Hola
User avatar
Freddy
 
Posts: 548
Joined: Sat Jun 02, 2007 3:42 pm
Location: Why do you want to know?
Score: 14 Give a positive score

Re: random appearance

Postby Caaz Games » Sat Mar 22, 2008 8:28 pm

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);
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Re: random appearance

Postby Freddy » Sat Mar 22, 2008 8:32 pm

Im pretty sure. :)
Hola
User avatar
Freddy
 
Posts: 548
Joined: Sat Jun 02, 2007 3:42 pm
Location: Why do you want to know?
Score: 14 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron