• 🏆 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!

Root/uproot abilities

Status
Not open for further replies.
Level 4
Joined
Apr 28, 2017
Messages
112
Hi, I was wondering is it possible to have 2 set abilities, one for rooted and one for uprooted state ?
When rooted I want the unit to have return gold ability, and when i uproot it I want to remove it.

I've written this trigger but it doesn't work:

EDIT: I also need uprooted unit to have cargo hold. Is that possible ? I've added cargo hold to the unit in object editor, when it's rooted it has it, once I uproot it, cargo hold disappears.


tempNumber is initially by default 0
unit is initially UPROOTED
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Root
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • tempNumber Equal to 0
        • Then - Actions
          • Unit - Add Return Gold to (Triggering unit)
          • Set tempNumber = 1
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • tempNumber Equal to 1
            • Then - Actions
              • Unit - Remove Return Gold from (Triggering unit)
              • Set tempNumber = 0
            • Else - Actions
 
Last edited:
Level 4
Joined
Apr 28, 2017
Messages
112
The uprooted version is a separate unit
you need to add cargo ability to him.

So you have 2 units, rooted and uprooted it's easy.

If you find that separated unit in object editor I'll salute you. Original unit has cargo hold, but once I uproot it disappears
 
Level 4
Joined
Apr 28, 2017
Messages
112
You're using uprooting like in night elf buildings?

yes, I'm using ability based on root (Ancient Protector). While rooted unit has all the abilities I need (cargo hold, load, unload), when I uproot it, they all disappear.
 
Level 4
Joined
Apr 28, 2017
Messages
112
Look in object editor in the rooted unit, check the dependant alternatives and here you set your uprooted unit. (do the same for the uprooted one)

There is no "alternative" at all. "There's Techtree - Dependency Equivalents" but that does nothing for this case. And like I said there's no "uprooted unit". It's a single unit, if you don't believe me, check if there are "uprooted versions" of night elf buildings in object editor.
 
Status
Not open for further replies.
Top