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

[Trigger] Crow Form bugged up

Status
Not open for further replies.
Level 3
Joined
Mar 26, 2012
Messages
14
Heya, i have a tiny problem - the flying trick with Crow Form seems to bug up. Unit DOES fly into the air, however won't come back. I have a feeling that this "wait" command is breaking up whole trigger, not sure why.

  • Smash HMM
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Smash
    • Actions
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (1.50 x (Real((Strength of (Triggering unit) (Include bonuses))))) damage of attack type Normal and damage type Normal
      • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Set Unit = (Target unit of ability being cast)
      • Custom script: if UnitAddAbility(udg_Unit,'Amrf') then
      • Custom script: call UnitRemoveAbility(udg_Unit,'Amrf')
      • Custom script: endif
      • Animation - Change (Target unit of ability being cast) flying height to 400.00 at 1600.00
      • Wait 0.25 seconds
      • Animation - Change (Target unit of ability being cast) flying height to 0.00 at 1600.00
 
Level 7
Joined
Nov 15, 2009
Messages
225
Remove the if and endif action.
call UnitAddAbility(...)
call UnitRemoveAbility(...)

You need a unit variable if you use waits between each action.
udg_Unit should be udg_YourUnitVariable (in your case the target unit of ability beeing cast)


Remember if you don't change your trigger it is always castable only from one unit at the same time.
 
Level 3
Joined
Mar 26, 2012
Messages
14
Those If/endif functions were taken directly from here and is NOT part of problem. The problem is unit coming down, as it seems to stay up in the air for no apparent reason.

There is a variable named Unit if you looked closely, that isn't problem either.

And i tried binding it to variable as well, that won't work either.

Its as if map isn't even noticing last part of trigger, after "Wait" command. I tried adding "Kill X unit" in different parts of trigger to see how it works, and it works fine pre-wait. After wait, nothing happens, so i want to know how to bypass that problem.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Remove the if and endif action.
call UnitAddAbility(...)
call UnitRemoveAbility(...)

The if thing is actually good. Imagine if the unit had Crow form before the spell, it would end up without it afterwards.


Like Serious Enemy mentioned, use a variable. Target unit of ability being cast is not "remembered" after a wait by the trigger.
 
Level 3
Joined
Mar 26, 2012
Messages
14
Guys, do read my posts more carefully please. I said, i did use variable, didn't help it.

Anyway, i did some work-around and remade spell in different way, used Paladon's jump system to do this thing instead. Thanks for help anyway!
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
Guys, do read my posts more carefully please. I said, i did use variable, didn't help it.

Why you post the wrong trigger then?

And yes, it doesn't work because of the variable.
You just have to use GetTriggerUnit() instead of GetSpellTargetUnit(), then it works:


  • Smash HMM
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Smash
    • Actions
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (1.50 x (Real((Strength of (Triggering unit) (Include bonuses))))) damage of attack type Normal and damage type Normal
      • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Set Unit = (Triggering unit)
      • Custom script: if UnitAddAbility(udg_Unit,'Amrf') then
      • Custom script: call UnitRemoveAbility(udg_Unit,'Amrf')
      • Custom script: endif
      • Animation - Change Unit flying height to 400.00 at 1600.00
      • Wait 0.25 seconds
      • Animation - Change Unit flying height to 0.00 at 1600.00
 
Status
Not open for further replies.
Top