Random Platform Creation

13islucky

  • Posts: 21
Hello stencylers,
I currently am trying to make a game which is a mix of a platformer and those iPod games where you keep the ball from touching the top of the screen while platforms come up from the bottom. I was wondering how to make the platforms appear at random? All help is appreciated and please make haste as this is for a 10 day game challenge, and I lack time.
Keep it Stencyl,
13islucky
Keep it Stencyl,
Thunderbird Games.

ChunkyMonkey

  • Posts: 430
Attach this to your platform actor:
When Created
make self always simulate

Always
{<if y of self > 0>
set y to (screen height)
set x to pick random 0 to (screen width)}

{set y-speed to 30}// This makes the platform fly up. You can change this number to anything.

13islucky

  • Posts: 21
Thanks but I would prefer to use the design mode. Any other suggestions? Also I want to to use pre-created platforms, ie: i have platforms already made and it picks from them at random.
Keep it Stencyl,
13islucky.
Keep it Stencyl,
Thunderbird Games.

ChunkyMonkey

  • Posts: 430
What I showed you isn't code XD. It's me typing in what I'd use in design mode. What I typed are blocks in design mode.

13islucky

  • Posts: 21
Okay but how do I chose at random which platform to use?
Keep it Stencyl,
13islucky
Keep it Stencyl,
Thunderbird Games.