• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

[Trigger] Detect morphed unit with trigger?

Status
Not open for further replies.
Level 5
Joined
Dec 25, 2018
Messages
110
I have ability based on bear form, base unit has ability that gives buff, I want this buff carry over when unit finishes morphing:


Unit - A unit Finishes casting an ability (bearform)
<Check if unit had buff>
<If unit had buff then add it to triggering unit>

How can I detect morphed unit?
 
Level 6
Joined
Aug 28, 2015
Messages
213
Either you could use the order event(no target/nightelf bear form)
Have a 0 second wait and add all abilities,
or you could do this for your buff ability;
There’s no GUI action unless Blizzard added it recently. You need to look up the spell’s raw code: press ctrl+d in the OE to see next to the name something like A001. Those 4 letters/numbers are the rawcode, which will also show the rawcode of the ability it was based on (but you can ignore that part).

Then use this line with the rawcode (caps are important) instead of RAWC below:

call UnitMakeAbilityPermanant(udg_UnitVariable, ‘RAWC’, true)
 
Level 41
Joined
Feb 27, 2007
Messages
5,183
FWIW buffs are just visual and don’t change any unit stats in-game. You can’t ‘add’ a buff to a unit, and even if you could you can’t change how long the buff lasts (to recast it).

its my understanding that morphing via bear form will keep all current buffs. Otherwise druids of the claw could cast roar and then lose the attack bonus after morphing.
 
Level 5
Joined
Dec 25, 2018
Messages
110
Either you could use the order event(no target/nightelf bear form)
Have a 0 second wait and add all abilities,
or you could do this for your buff ability;
  • Switch check
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(bearform))
    • Actions
      • Wait 0.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Charged Bullet for (Triggering unit)) Equal to 1
        • Then - Actions
          • Unit - Add Charged Bullet to (Triggering unit)
          • Unit - Add Bullet effect (+1) to (Triggering unit)
        • Else - Actions
Doesn't work, not sure how to implement second option u sent.
 
Level 5
Joined
Dec 25, 2018
Messages
110
FWIW buffs are just visual and don’t change any unit stats in-game. You can’t ‘add’ a buff to a unit, and even if you could you can’t change how long the buff lasts (to recast it).

its my understanding that morphing via bear form will keep all current buffs. Otherwise druids of the claw could cast roar and then lose the attack bonus after morphing.
I meant ability not buff, my bad.
I am adding critical strike to target before he morphs, after the morph its gone.
So I want to make trigger that check if unit had cric before morph and then add it to morphed state.
 
Status
Not open for further replies.
Top