• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Changing my Trigger to include Regional Condition

Status
Not open for further replies.
Level 3
Joined
Jun 1, 2005
Messages
42
[trigger=Specific Removal Trigger]
Events
Unit - A unit Dies
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
Unit - Remove (Dying Unit) from the game
Set Spawn[1] = Number of units in (Units in Region 001 Red <gen> owned by Player 12 (Brown)))
Leaderboard - Change the Value for Player 1 (red) in (Last Created leaderboard) to Spawn [1]
Else - Actions
Do Nothing
[/trigger]

This is what i currently have. however, because this removes the corpse, it means spells like Animate Dead or Resurrection Cannot be used. However, if i don't remove the Corpse, the Spawn[1] Value doesn't change.

I can't use Set Spawn[1] = (Number of living SpawnType units owned by Player 12 (Brown)) either since it has to go on the leaderboard of "how many there are left spawned in a specific region."

is there a condition i can add to it to make it so that it does something like "If ((Dying Unit) dies in Region 001 Red)) then do (Set Spawn[1] = Spawn[1] - 1) else do (Do Nothing)???
 
  • Trigger
  • Events
    • Unit - A unit dies
  • Conditions
    • (RegionX <gen> contains (Triggering unit)) Equal to True //Unit - Unit in Region {Boolean comparison}
  • Actions
    • Set Spawn[1] = (Spawn[1] - 1)
or
  • Trigger
  • Events
    • Unit - A unit dies
  • Conditions
  • Actions
    • Set Point1 = (Position of (Triggering unit))
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (RegionX <gen> contains Point1) Equal to True //Region - Region contains point {Boolean comparison}
      • Then - Actions
        • Set Spawn[1] = (Spawn[1] - 1)
      • Else - Actions
    • Custom script: call RemoveLocation (udg_Point1)
 
Status
Not open for further replies.
Back
Top