multiple actors spawning

EldonRougeEldonRouge Member, PRO Posts: 14
edited September 2015 in Working with GS (PC)

i'm new to Gamesalad.

I'm having a problem with multiple actors spawning when only 1 should.

http://arcade.gamesalad.com/games/133144

when a beater collides with a cushion, there is either a dust cloud actor spawned, or a dust cloud actor WITH fart.

what's happening is multiple farts are spawned. this is verified by the fart count, and the graphics that appear on the screen.

the logic for the dust cloud is:

  • change attribute game.fart delay(integer): (should be boolean?) so there is a delay between when another fart may be released. (changes when the beater gets far enough away from the cushion to allow another collision to be accepted)
  • timer: for 1sec scale the dust cloud image to a factor of 3 (the dust grows outward from the collision)
  • interpolate alpha: fade the dust image to invisible for 1 sec
  • change attribute: set fart type to a random of 1-8
  • rule: if fart type is 1, spawn actor farttype1
  • rule: if fart type is 2, spawn actor farttype2
  • etc.
  • timer: after 2 secs, destroy self.

what's happening is sometimes multiple farttype actors are spawning during one collision. when swiping really fast, 4-5 farts are spawning during each collision.

I knew this was occurring while i was building, but let it slide at first, cuz i thought multiple farts spawning was just as fun and added to the score.... it happened in preview, happened in the arcade while playing on a laptop, and now is worst when testing the arcade game on an iphone. when using the third beater and swiping vigorously, so many farts spawn that the whole game bogs down to the point of being unplayable.

any suggestions?

Comments

  • EldonRougeEldonRouge Member, PRO Posts: 14

    i'm sure that the more actors that are active are slowing down the game... and that slows the program...

    making even more actors spawn during the duration that the actor is spawning new ones...

    how do i stop it?

  • EldonRougeEldonRouge Member, PRO Posts: 14

    I did solve the problem, incase anyone reading this encounters a similar problem.

    I took out the 2 second delay (which was intended to allow time for everything to happen before destroying)

    and put a destroy into each of the spawn actor rules, which solved the problem.

    Apparently, the delay before destroying was causing multiple spawn events.

Sign In or Register to comment.