• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Ability Granted/Removed by Entering/Leaving Region

Status
Not open for further replies.
Level 11
Joined
Dec 13, 2008
Messages
1,047
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