Spawn actors in a different time

kiwacikiwaci Member, PRO Posts: 72

hello,
so, i've added an attribute to my game called "level", then i add a behaviour : change "level" to random(1,3), and when level=1 an actor will be spawned, and when level=2 an other actor will be spawned, and so on, but the problem is that all the actors are spawned. My idea is that after 15sec "level" will change . But the problem like i mentioned is that all the actors are spawned , there's no time between them. So, can anyone please help me.

Thank You.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Post a screenshot of your rules. You have something set up incorrectly.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SmokeyAce73SmokeyAce73 EarthMember Posts: 370

    Please explain how you are changing the 'Level' attribute, also how do you have your spawner setup to spawn the actors.... I would do the following (not tested)

    As if you were starting again:
    Create integer as level

    On the spawner create a timer to run every 15 seconds (run to completion)
    change attribute >> game.level >> random(1,3)

    Create a new rule on the spawner
    rule>>if attribute game.level = 1
    Spawn actor 1
    ELSE
    change attribute game.level 0
    Rule >>if attribute game.level = 2
    spawn actor 2
    ELSE
    change attribute game level 0
    Rule >>if attribute game.level = 3
    spawn actor 3
    ELSE
    change attribute game level 0

    Developer For BLUNTentertainment - Feel Free To Message Me! - Free Beginner Templates!

  • kiwacikiwaci Member, PRO Posts: 72

    here's an the screenshot of the actor where i put the spawning behaviour

    https://www.dropbox.com/s/sttw4dwl5gqlr1t/Screen Shot 2014-03-12 at 19.44.03.png

    and here's the actor that control him

    https://www.dropbox.com/s/sje8vtb8bokl0hk/Screen Shot 2014-03-12 at 19.44.24.png

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    If every 2 seconds you spawn a goal actor that then spawns dog1 (or other) actors every 5 seconds, you're going to have a lot of spawning going on. Is that how you have it set up?

    Also, what happens when you turn off one spawn rule or the other? Do the correct actors spawn?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • kiwacikiwaci Member, PRO Posts: 72

    yes, there a lot of spawning , and when i turn off one spawn rule, yes, the correct actors spawn

  • kiwacikiwaci Member, PRO Posts: 72

    ok, never mind i found how to do it , thank you for your time :smiley:

Sign In or Register to comment.