How to spawn.....

Hello,

I would like to ask you about how to spawn 2 actors at the same random time.

Let's say when actor 1 spawns after random time between 1-5 then actor 2 recognises it and spawns too.

Thank you in advance

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    If you always want actor 1 to spawn actor 2, you can add a spawn behavior directly to actor 1 that spawns actor 2.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    edited March 2013
    One way to do this would be to create one boolean attribute and set it to false.

    Now, create a timer - after random(1,x) seconds,
    change attribute game.NewBooleanAttribute to true.

    Then create a rule
    When attribute game.NewBooleanAttribute is true

    Spawn actor 1
    Spawn actor 2

    This is a simple method, but I hope it helps.
  • SingleSparqSingleSparq Member Posts: 1,339
    You could spawn the 2nd actor from the first actor you spawn. Or use a global attribute that triggers yes (no when its destroyed) when that first actor appears telling another rule to spawn the 2nd actor.
  • RittenhouseRittenhouse Member Posts: 305
    This guy has you covered on this one --> @Braydon_SFX
    I was going to suggest basically what he said. :)

    Keep it simple on yourself. :) In gamesalad, the smaller the system, the tighter it will work. :)

Sign In or Register to comment.