SC2Mapster Forums

Development > Triggers

Double Event ( Trigger )

  • 6 posts
    #1 Apr 13, 2012 at 16:05 UTC - 0 likes

    Hi, I've recently learned almost all i know on the galaxy editor on this forum ... But there is a specific problem that i can't solve :

    I want to spawn units from my first building ( ex. nydus worm ), so i create a periodic event ... And i set the second building ( further in the map ) to spawn units when the first nydus is destroyed. The problem is, that if i do that, i can't set a periodic event to spawn my units every 4 seconds.

    Here is a pic of my trigger -> http://imgur.com/5F3Uh

    If you guys could tell me how to apply 2 events or just solve my problem with another way, i would be grateful :)

    Ps : Sorry for the bad english, it's not my first language

    #2 Apr 13, 2012 at 18:57 UTC - 0 likes

    You just need conditions here. I dont have galaxy atm, but the idea would be somethig like:

    Trigger 1: First Nydus Worm - Unit Spawn
    Events
    -Periodic Event - 5 secs
    Conditions
    -Unit Nydus Worm 1 is not dead
    Actions
    -Spawn Units and such near the First Nydus Worm

    Trigger 2: Second Nydus Worm - Unit Spawn
    Events
    -Periodic Event - 5 secs
    Conditions
    -Unit Nydus Worm 1 is dead
    Actions
    -Spawn Units and such near the Second Nydus Worm

    Last edited Apr 13, 2012 by Alevice
    #3 Apr 13, 2012 at 19:08 UTC - 0 likes

    You can also do that in only one trigger:

    Event: Map init
    Conditions: None
    Actions:
    Repeat forever:

    • IF "nydus worm 1" is alive THEN spawn units at position of "nydus worm 1" ELSE spawn units at position of "nydus worm 2"
    • Wait 5 seconds
    #4 Apr 13, 2012 at 20:04 UTC - 0 likes

    Better yet use an if then else if instead of just the regular if then else cuz in the event both worms are dead you probably don't want to spawn units at all.

    Last edited Apr 13, 2012 by hobbidude

    When I want your opinion...I'll give it to you!

    http://i.imgur.com/8iyk6Lw.png?1

    #5 Apr 13, 2012 at 20:19 UTC - 0 likes
    Quote from ZealNaga: Go

    You can also do that in only one trigger:

    Event: Map init
    Conditions: None
    Actions:
    Repeat forever:

    IF "nydus worm 1" is alive THEN spawn units at position of "nydus worm 1" ELSE spawn units at position of "nydus worm 2"

    Wait 5 seconds

    Even better you could have a periodic event to spawn at a Region/Point var. At map init, just set said var to the first nydus worm location and on death, just set it to the secnd worms location.

    #6 Apr 17, 2012 at 22:40 UTC - 0 likes

    Hey it's me MacSC ( forgot my password :$ ) I just wanted to tell you guys that i love you so much :D

    thx thx thx to have solved my problem :)

  • 6 posts

You must login to post a comment. Don't have an account? Register to get one!