spawn a certain number

SAMmanSAMman Member Posts: 228
edited November -1 in Working with GS (Mac)
hey guys, I have a background set up to spawn an actor when I click, but I want it to spawn 3 or 4 or 5 actors each time I click depending on the level the player is on. anyone have any suggestions on the best way to do that? I am stumped, thanks.
SM

Comments

  • SAMmanSAMman Member Posts: 228
    anyone?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi SAMman, make a game integer attribute, call it Level. On each level, put an actor outside of the playing area and in it, a Rule: Change attribute Level To Level + 1
    When Level attribute = 1
    Spawn Actor

    When Level attribute = 2
    Spawn Actor
    Spawn Actor

    Etc.

    Can't think of an easier way to spawn mulitple actors in one stroke; maybe someone else can suggest.

    Or take advantage of this and have them spawn half a second apart for instance, with a popping noise as they appear on screen... just a thought! :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • RedlerTechRedlerTech Member Posts: 1,583
    Hey SAMman,
    Create an integer attribute called Level (0)
    Create an integer attribute called Spawned (0)

    Whatever your doing to change level or go to the next round... Change attribute Level to Level+1
    Timer every 0 seconds, Rule: (If mouse is downOPTIONAL), level doesn't = spawned, spawn actor & change Spawned to Spawned + 1.

    Enjoy,
    Matt
  • RedlerTechRedlerTech Member Posts: 1,583
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi NextGen, sounds good; I did think a Timer would be the way to go but then thought there might be trouble there... anyhow, cheers! :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • RedlerTechRedlerTech Member Posts: 1,583
    :-) SAMman feel free to tell us if you ran in any trouble.
  • SAMmanSAMman Member Posts: 228
    hey guys, thanks for the responses! I will try that right now and let you know how it goes.
    SM
  • SAMmanSAMman Member Posts: 228
    I did run into some trouble with a biker gang but I don't think that is what you meant. ;)
Sign In or Register to comment.