How to spawn a random actor (object) every x seconds?

ggiersdorf

  • Posts: 52
IM new to Stencyl and to programming all together. Spent the last few days reading and writing some code for a basic flappy bird type game to get some experience and am stuck at two things. for this post Ill stick with the random actors.

1. So I created 6 objects (pipes lets call them) I spawn in pipe 1 at y/x locations and set them to move at a negative speed of -10. They slide from right to left perfectly. I also set this up to spawn every 3 seconds. Problem is this is just one set of pipes. constantly moving the same. I have 5 others I want to have randomly spawn at same locations with same movement speed each with their own collision setup ( I can do that) so the pipes vary.

Can anyone show or tell me the commands to create this effect?
 

mormord

  • Posts: 94
*OFF
First thing, don't create games that are already there, this is my opinion.

Now to the theme:
You should check out Ceric's answers here, I'm sure you can use some of those things.
http://community.stencyl.com/index.php/topic,28569.msg164355.html#msg164355