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

Ability Granted/Removed by Entering/Leaving Region

Status
Not open for further replies.
Level 12
Joined
Dec 13, 2008
Messages
1,049
Hello everybody. So, I am making a trigger that is supposed to add an ability when any unit owned by Teal enters a region, or removes that ability when the unit leaves the region. This is what I have so far:

  • Water 1
    • Events
      • Unit - A unit enters Water 1 <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 3 (Teal)
    • Actions
      • Unit - Add Refreshed Scales to (Entering unit)
  • Water 1 Copy
    • Events
      • Unit - A unit leaves Water 1 <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 3 (Teal)
    • Actions
      • Unit - Remove Refreshed Scales from (Entering unit)
After testing ingame, the problem arises when the unit leaves the region. It will not remove the ability. This is obviously a big problem. Does anyone have any idea of how to fix this? Thanks!

P.S. Also, since I want this to occur in many regions (i am not sure the exact number, but i am guessing anywhere between 25 and 50), I was wondering if I could combine these regions into just 1 region (so I only need 1 trigger, not 25-50 triggers). Thanks again!
 
Like this:
  • T1
    • Events
      • Unit - A unit enters "Region"
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 3 (Teal)
    • Actions
      • Unit - Add "Spell" to (Triggering unit)
  • T2
    • Events
      • Unit - A unit leaves "Region"
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 3 (Teal)
    • Actions
      • Unit - Remove "Spell" to (Triggering unit)
 
Status
Not open for further replies.
Top