SC2Mapster Forums

Development > Triggers

Trigger Recreation Help Please? [Trigger Setup Shown]

  • 16 posts
    #1 Dec 25, 2012 at 19:18 UTC - 0 likes

    How it works: Player moves chooser (unit) to a point / region(whatever works). The desired unit to spawn via what the chooser has chosen then spawn at the players base(region) in the amount of 5 every X amount of seconds(10) and repeats until chooser leaves the point.

    Then when the chooser leaves the point or region, the spawn mode for that unit stops (boolean changes to false I guess), and that's it. It would be reactivated if the chooser were to go back(or to a different unit point if they wish to spawn a different unit, which is the same spawn trigger, etc, etc)

    NOTE: The variable names do NOT need to be the same. They don't really matter as of right now. Just chooser and unit1 spawn, unit2 spawn, etc..

    The spawn trigger looks like this and works perfect:

    (W)Create Mechanical Golems
        Events
            Unit - (Unit (Owner of (Triggering unit)) from Peon) Enters Starter: Mech Golems
        Local Variables
        Conditions
            (Triggering unit) == (Unit (Owner of (Triggering unit)) from Peon)
        Actions
            Variable - Set Mech Golems Selected[(Triggering player)] = True
            Trigger - Run Finding Player Peon  (Check Conditions, Wait until it finishes)
            General - Repeat (Actions) forever
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Mech Golems Selected[(Triggering player)] == True
                        Then
                            General - Repeat (Actions) forever
                                Actions
                                    General - Wait 2.0 Game Time seconds
                                    Unit - Create 1 Firebat for player (Triggering player) at Base Point using default facing (No Options)
                        Else
    

    Also; A condition(I think..) needs to be added so they will only spawn if the player supply used is less than 150.

    The despawn trigger looks like this:

    (W)Despawn Mech Golems
        Events
            Unit - (Unit (Owner of (Triggering unit)) from Peon) Leaves Starter: Mech Golems
        Local Variables
        Conditions
            (Triggering unit) == (Unit (Owner of (Triggering unit)) from Peon)
        Actions
            General - Repeat (Actions) forever
                Actions
                    Variable - Set Mech Golems Selected[(Triggering player)] = False
    

    Problem: I've spent hours trying to figure out which triggers to use for which parts. Could anyone please help me out? Maybe create the triggers themselves and send the map to me so I could copy & past them / learn how to make em. Or, contact me on skype? canadian.piro Thanks!

    Last edited Dec 25, 2012 by xXPwnerOfNoobsXx

    Signature ..Why is my sig picture not showing?

    #2 Dec 25, 2012 at 19:40 UTC - 0 likes

    @xXPwnerOfNoobsXx: Go

    Despawn only has the one event? If so, I think the problem is you're trying to call a "triggering unit" however one doesn't exist because nothing was triggered by a unit.

    Instead, since by the sounds of it only one spawner is allowed per player, just add the spawners to an array of 16 (for each player) and do

    Unit - Spawner[PLAYERNUMBERHERE] Leaves Starter: Mech Golems
    

    An example being

    Unit - Spawner[1] Leaves Starter: Mech Golems
    Unit - Spawner[2] Leaves Starter: Mech Golems
    Unit - Spawner[3] Leaves Starter: Mech Golems
    etc
    

    You could also use the data table although it's a bit more confusing so I suggest only using the data table for complex tracking/triggers.

    #3 Dec 25, 2012 at 19:46 UTC - 0 likes

    I know what you're saying, and thanks, but that's not exactly what I'm asking for....

    Last edited Dec 25, 2012 by xXPwnerOfNoobsXx
    #4 Dec 25, 2012 at 19:49 UTC - 0 likes

    @xXPwnerOfNoobsXx: Go

    Hang on, let me try to recreate it.

    EDIT: Sorry about that, was a bit more complicated then I had expected, but here is a working trigger: (see attached).

    Last edited Dec 25, 2012 by Yaksmanofage
    Name Size MD5
    test.SC2Map 13.2 KiB 1c8235c92e23...
    #5 Dec 25, 2012 at 19:54 UTC - 0 likes
    Quote from Yaksmanofage: Go

    @xXPwnerOfNoobsXx: Go

    Hang on, let me try to recreate it.

    Thank youu!!!!

    #6 Dec 25, 2012 at 20:24 UTC - 0 likes

    @xXPwnerOfNoobsXx: Go

    In case you aren't watching the thread, I posted the map.

    #7 Dec 25, 2012 at 21:57 UTC - 0 likes
    Quote from Yaksmanofage: Go

    @xXPwnerOfNoobsXx: Go

    In case you aren't watching the thread, I posted the map.

    Thanks, I'll check it out!

    Perfect! Now I just need to implement it. I'll let you know how I do.

    Last edited Dec 25, 2012 by xXPwnerOfNoobsXx
    #9 Dec 25, 2012 at 22:22 UTC - 0 likes

    @Yaksmanofage: Go

    What is the meaning of the apple and tree - haven under melee initialization? Also they're red.

    • 1.png
    #10 Dec 25, 2012 at 22:40 UTC - 0 likes

    @Yaksmanofage: Go

    Small problem... When a player chooses a unit to spawn, it needs to spawn at that players base. How would I go about this?

    EDIT: Making the spawn points the player start locations, and set to spawn at players start location for player does NOT work.

    Last edited Dec 26, 2012 by xXPwnerOfNoobsXx
    #11 Dec 26, 2012 at 00:46 UTC - 0 likes

    @xXPwnerOfNoobsXx: Go

    This is a test map of mine, I just disabled those.

    @xXPwnerOfNoobsXx: Go

    You can add a point instead of a start locations. If that doesn't work, creating them in the center of a region should.

    #12 Dec 26, 2012 at 01:01 UTC - 0 likes
    Quote from Yaksmanofage: Go

    @xXPwnerOfNoobsXx: Go

    This is a test map of mine, I just disabled those.

    @xXPwnerOfNoobsXx: Go

    You can add a point instead of a start locations. If that doesn't work, creating them in the center of a region should.

    I used start locations so I can just use one of each spawn trigger (if statement) for all the players. I changed the spawn points to the player start location., which should work fine, but doesn't. Otherwise I don't know how to have the units automatically spawn at the desired players base without copying all the triggers and specifically stating which point for each player for each spawn trigger.

    #13 Dec 26, 2012 at 01:13 UTC - 0 likes

    @xXPwnerOfNoobsXx: Go

    Well, there are two things I could do:

    1. look over it and do it myself

    2. try and diagnose a problem via text

    I assume you copy-pasted the code? If that's the case 2 is pretty much already done.

    Otherwise I really don't know what to say. Like I said, manually setting a point (not a start point) should work, otherwise you can try making it the center of a region and set regions in each base.

    Last edited Dec 26, 2012 by Yaksmanofage
    #14 Dec 26, 2012 at 01:28 UTC - 0 likes

    @Yaksmanofage: Go

    check your PM's

    #15 Dec 26, 2012 at 01:43 UTC - 0 likes

    @xXPwnerOfNoobsXx: Go

    back at-cha

    #16 Dec 29, 2012 at 06:47 UTC - 0 likes

    I'm not sure what exactly is up to date since it looks like your trained maps, but based on the op the correct was to do with would be to have a single trigger with just the unit enters regions event, use the condition to check for the specific unit or unit type that activates it. Actions should then be a while loop that checks if the triggering unit is in the region. Then just spawn the unit at the points; there may be already be a specific action that lets you pick the point as the triggering players starting point but if not have the init trigger assign the points to an array based on the players integer and then just have this trigger spawn at the point corresponding to the array with the triggering player integer.

    Last edited Dec 29, 2012 by hobbidude

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

    http://www.sc2pod.com/achievement.php?id=13361

    #17 Dec 29, 2012 at 07:17 UTC - 0 likes

    @hobbidude: Go

    I was able to help him with an action definition that worked similarly. He just hasn't locked the thread.

  • 16 posts

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