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

Changing abilities

Status
Not open for further replies.
Level 7
Joined
Dec 26, 2010
Messages
401
Hello, it's been a while since I've modded and I've briefly tried to trigger a hero morph ability that also changes abilities as the hero morphs, right now it's based on metamorphosis and I have the ability to trigger a hero ability swap upon cast and a toggle of the triggers for each casted instance of the morph spell. If anyone could point out where I'm doing it wrong I would greatly appreciate it, thank you in advance.
  • Bear Form On
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Bear Form
    • Actions
      • Unit - Remove Entangling Roots from (Triggering unit)
      • Unit - Remove Rejuvenation from (Triggering unit)
      • Unit - Remove Roar from (Triggering unit)
      • Unit - Add Roar (Morph) to (Triggering unit)
      • Unit - Add Swipe to (Triggering unit)
      • Unit - Add Slam to (Triggering unit)
      • Trigger - Turn on Bear Form Off <gen>
      • Trigger - Turn off (This trigger)
  • Bear Form Off
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Bear Form
    • Actions
      • Unit - Add Entangling Roots to (Triggering unit)
      • Unit - Add Rejuvenation to (Triggering unit)
      • Unit - Add Roar to (Triggering unit)
      • Unit - Remove Roar (Morph) from (Triggering unit)
      • Unit - Remove Slam from (Triggering unit)
      • Unit - Remove Swipe from (Triggering unit)
      • Trigger - Turn on Bear Form On <gen>
      • Trigger - Turn off (This trigger)
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
First of all use "A unit starts the effect of an ability" as the event.
Secondly, I recommend you to change the abilities using Engineering Upgrade and add/remove it when the unit casts that ability.

When transforming a unit, your unit will lose all abilities that were given to him by triggers unless they are made permanent with that script Arad MNK showed.

Also, instead of this stupid turn off/turn on trigger thingy, you check if the triggering unit has the engineering upgrade ability.
If so, you remove it, otherwise you add it and make it permanent.
 
Status
Not open for further replies.
Top