• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Some help with a trigger

Status
Not open for further replies.
Level 3
Joined
May 6, 2007
Messages
37
Hi guys because iam a little noob at this i need some help with some triggers.

I would like to make some units to be spawn from a portal and of course i would like that each round the unit that spawns will be different.
 
Level 6
Joined
Nov 28, 2007
Messages
203
Round is an Integer variable.
This trigger changes the Round:
  • Next Wave
    • Events
      • Time - Every 120 seconds of game time
    • Conditions
    • Actions
      • Set Round = (Round + 1)
This trigger spawns units every 30sec at Round 1:
  • Wave 1
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
      • Round Equal to 1
    • Actions
      • Unit - Create 1 Your Unit for A player at (Random point in Spawn Demons <gen>) facing Default building facing degrees
This trigger spawns units every 30sec at Round 2:
  • Wave 2
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
      • Round Equal to 2
    • Actions
      • Unit - Create 1 Your Unit for A player at (Random point in Spawn Demons <gen>) facing Default building facing degrees
 
Last edited:
Level 3
Joined
May 6, 2007
Messages
37
Well guys i would like some help for some other triggers.

I would like a trigger that will make the units that will spawn each round to move, until they will end up to a (circle of power).
when that happens the player will lose a 1 of life for each monster.
 
Level 6
Joined
Nov 28, 2007
Messages
203
i'll make the triggers so that the units won't stuck. they can walk over a point that they've already passed (so u could make the beginning to an end too :D)

These triggers are for 6 movement points.

Check_Units_Stuck is an Unit Group Array variable.
Spawn, Move 1, Move 2, Move 3, Move 4 and End are regions.
  • Move
    • Events
      • Unit - A unit enters Spawn <gen>
      • Unit - A unit enters Move 1 <gen>
      • Unit - A unit enters Move 2 <gen>
      • Unit - A unit enters Move 3 <gen>
      • Unit - A unit enters Move 4 <gen>
      • Unit - A unit enters End <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Spawn Demons <gen> contains (Triggering unit)) Equal to True
          • ((Triggering unit) is in CheckUnitsStuck[0]) Equal to False
          • ((Triggering unit) is in CheckUnitsStuck[1]) Equal to False
          • ((Triggering unit) is in CheckUnitsStuck[2]) Equal to False
          • ((Triggering unit) is in CheckUnitsStuck[3]) Equal to False
          • ((Triggering unit) is in CheckUnitsStuck[4]) Equal to False
        • Then - Actions
          • Unit - Order (Triggering unit) to Move To (Center of Move 1 <gen>)
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[0]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[1]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[2]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[3]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[4]
          • Unit Group - Add (Triggering unit) to CheckUnitsStuck[0]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Move 1 <gen> contains (Triggering unit)) Equal to True
          • ((Triggering unit) is in CheckUnitsStuck[0]) Equal to True
        • Then - Actions
          • Unit - Order (Triggering unit) to Move To (Center of Move 2 <gen>)
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[0]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[1]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[2]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[3]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[4]
          • Unit Group - Add (Triggering unit) to CheckUnitsStuck[1]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Move 2 <gen> contains (Triggering unit)) Equal to True
          • ((Triggering unit) is in CheckUnitsStuck[1]) Equal to True
        • Then - Actions
          • Unit - Order (Triggering unit) to Move To (Center of Move 3 <gen>)
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[0]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[1]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[2]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[3]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[4]
          • Unit Group - Add (Triggering unit) to CheckUnitsStuck[2]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Move 3 <gen> contains (Triggering unit)) Equal to True
          • ((Triggering unit) is in CheckUnitsStuck[2]) Equal to True
        • Then - Actions
          • Unit - Order (Triggering unit) to Move To (Center of Move 4 <gen>)
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[0]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[1]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[2]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[3]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[4]
          • Unit Group - Add (Triggering unit) to CheckUnitsStuck[3]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Move 4 <gen> contains (Triggering unit)) Equal to True
          • ((Triggering unit) is in CheckUnitsStuck[3]) Equal to True
        • Then - Actions
          • Unit - Order (Triggering unit) to Move To (Center of End <gen>)
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[0]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[1]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[2]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[3]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[4]
          • Unit Group - Add (Triggering unit) to CheckUnitsStuck[4]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (End <gen> contains (Triggering unit)) Equal to True
          • ((Triggering unit) is in CheckUnitsStuck[4]) Equal to True
        • Then - Actions
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[0]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[1]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[2]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[3]
          • Unit Group - Remove (Triggering unit) from CheckUnitsStuck[4]
          • Unit - Remove (Triggering unit) from the game
          • Set Lifes = (Lifes - 1)
        • Else - Actions
  • Antistuck
    • Events
      • Time - Every 4.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in CheckUnitsStuck[0] and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of Move 1 <gen>)
      • Unit Group - Pick every unit in CheckUnitsStuck[1] and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of Move 2 <gen>)
      • Unit Group - Pick every unit in CheckUnitsStuck[2] and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of Move 3 <gen>)
      • Unit Group - Pick every unit in CheckUnitsStuck[3] and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of Move 4 <gen>)
      • Unit Group - Pick every unit in CheckUnitsStuck[4] and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of End <gen>)
 
Level 6
Joined
Nov 28, 2007
Messages
203
you're welcome :D if it doesn't work or something, then please tell :D (haven't tested it, but it should work)
 
Last edited:
Level 3
Joined
May 6, 2007
Messages
37
you're welcome :D if it doesn't work or something, then please tell :D (haven't tested it, but it should work)

I have a small question to ask u

In the part u wrote (Spawn Demons <gen> contains (Triggering unit)) Equal to True is a boolean comparison? and where u wrote set lifes is a variable?
 
Level 3
Joined
Aug 24, 2007
Messages
33
Im not sure what humpa was saying about the second one, but the first one is boolean, it's- Condition-Boolean Comparison-(Triggering unit is a structure)-Scroll to Region contains point-(playable map area to your region) contains-(click on Unit-Position of unit)
 
Level 6
Joined
Nov 28, 2007
Messages
203
I have a small question to ask u

In the part u wrote (Spawn Demons <gen> contains (Triggering unit)) Equal to True is a boolean comparison? and where u wrote set lifes is a variable?

yes and yes :) (sry for forgetting to write about the life integer ^^)
 
Level 6
Joined
Nov 28, 2007
Messages
203
dunno what u mean.. do u mean the whole condition or just CheckUnitsStuck[1]?
the condition is boolean and CheckUnitsStuck is an UnitGroup variable array
 
Level 3
Joined
May 6, 2007
Messages
37
dunno what u mean.. do u mean the whole condition or just CheckUnitsStuck[1]?
the condition is boolean and CheckUnitsStuck is an UnitGroup variable array

Basic i was only meaning about the CheckUnitsStuck thx for answering:grin:
 
Last edited:
Status
Not open for further replies.
Top