[Solved] Trigger question

Status
Not open for further replies.
Level 7
Joined
Feb 23, 2020
Messages
253
Hello, how do i make a trigger like this only fire once per unit? I want the unit to gain increased stats only the first time they enter the region.

  • Increase Unit Stats
    • Events
      • Unit - A unit enters Blood Elf Spawn <gen>
      • Unit - A unit enters Draenei Spawn <gen>
      • Unit - A unit enters Hell Spawn Spawn <gen>
      • Unit - A unit enters Ice Troll Spawn <gen>
      • Unit - A unit enters Undead Spawn <gen>
      • Unit - A unit enters Orc Spawn <gen>
      • Unit - A unit enters Night Elf Spawn <gen>
      • Unit - A unit enters Murloc Spawn <gen>
      • Unit - A unit enters Night Elf Spawn <gen>
    • Conditions
      • (Owner of (Triggering unit)) Not equal to Player 1 (Red)
      • (Owner of (Triggering unit)) Not equal to Player 2 (Blue)
      • (Owner of (Triggering unit)) Not equal to Player 3 (Teal)
      • (Owner of (Triggering unit)) Not equal to Player 4 (Purple)
    • Actions
      • -------- Health --------
      • Unit - Set Max HP of (Triggering unit) to (((Integer((Max life of (Triggering unit)))) x GameProgress) x 1)
      • Unit - Set life of (Triggering unit) to (((Life of (Triggering unit)) x (Real(GameProgress))) x 1.00)
      • -------- Mana --------
      • Unit - Set Max Mana of (Triggering unit) to (Integer((((Max mana of (Triggering unit)) x (Real(GameProgress))) x 0.70)))
      • Unit - Set mana of (Triggering unit) to (Max mana of (Triggering unit))
      • -------- Armor --------
      • Unit - Set Armor of (Triggering unit) to (((Armor of (Triggering unit)) x (Real(GameProgress))) x 0.30)
      • -------- Damage --------
      • Unit - Set Base Damage of (Triggering unit) to (Integer((((Real((Base Damage of (Triggering unit) for weapon index 0))) x (Real(GameProgress))) x 0.80))) for weapon index: 0
 

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,189
In addition to what Chaosy suggested, you can use a Unit Group to keep track of the units that have already entered a region.

  • Events:
  • A unit enters Blood Elf Spawn
  • Conditions:
  • Triggering unit is in OurNewUnitGroup equal to False
  • Actions:
  • Add hp/mana/armor/dmg...
  • Add triggering unit to OurNewUnitGroup
 
Level 7
Joined
Feb 23, 2020
Messages
253
Thank you all for the help! I will use what Uncle said which will work perfectly fine for me! :)
 
Status
Not open for further replies.
Top