• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

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.
Top