endless game spawn problem- SOLVED

raghav52

  • Posts: 6
i tried making an endless running game  but i ran into some trouble in creating randomly spawned platforms.
the screenshots for the behavior i made are attached to the post.
the problem is that the behavior works properly for the first few seconds but then starts spawning too many actors at the same time. heres the the link to my game- http://www.stencyl.com/game/play/15033
 
does anyone have a solution to this problem?
plz help.
HERES THE LINK TO MY NEW GAME- http://www.stencyl.com/game/play/15041

« Last Edit: October 23, 2012, 09:27:47 am by raghav52 »

rob1221

  • *
  • Posts: 9473
Given the exponential increase (1,2,4,8,16) I'm guessing you have the behavior attached to the block itself.  If so, move it to the scene.

rahulmartin

  • Posts: 315
does random returns floating values too ?

froz

  • Posts: 250
One block does not, the other one does.

http://static.stencyl.com/pedia2/blocks/numbers_text/math/random.html


Edit: Ok, I read the rest of the topic. The OP could make it "if random = 0" and "if random = 1" and it would be the same.

rahulmartin

  • Posts: 315
One block does not, the other one does.

http://static.stencyl.com/pedia2/blocks/numbers_text/math/random.html


Edit: Ok, I read the rest of the topic. The OP could make it "if random = 0" and "if random = 1" and it would be the same.

ok.. that explained a lot