• 🏆 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] My spell Does not work

Status
Not open for further replies.
Level 2
Joined
Sep 30, 2008
Messages
13
My spell Grand Slash dont work

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Grand Slash
  • Actions
    • Unit - Add Storm Crow Form to (Casting unit)
    • Animation - Change (Casting unit) flying height to 450.00 at 100.00
    • Animation - Change (Casting unit)'s animation speed to 50.00% of its original speed
    • Unit - Pause (Casting unit)
    • Unit - Make (Casting unit) Invulnerable
    • Unit - Remove Storm Crow Form From (Casting Unit)
    • Wait 4.00 seconds
    • Animation - Player (Casting unit)'s Attack animation
    • Unit - Move (Casting unit) instantly to (Position of (Target unit of ability being cast))
    • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 500.00 damage of attack type Hero and damage type Normal
    • Unit - Make (Casting unit) Vulnerable
    • Unit - Unpause (Casting unit)
    • Animation - Change (Casting unit) flying height to 0.00 at 200.00
    • Animation - Change (Casting unit)'s animation speed to 100.00% of its original speed
Please tell me the problem

Edit:
solved
Variable fixed the problem it stored the casting unit and the target and also the location for the casting unit and the targeted unit
 
Last edited:
Level 2
Joined
Sep 30, 2008
Messages
13
  • Grand Slash
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Grand Slash
  • Actions
    • Set caster = (Casting Unit)
    • Set enemy = (Target unit of ability being cast)
    • Set caster_loc = (Position of caster)
    • Set enemy_loc = (Position of enemy)
    • Unit - Add Storm Crow Form to (Casting unit)
    • Animation - Change (Casting unit) flying height to 999999.00 at 400.00
    • Animation - Change (Casting unit)'s animation speed to 30.00% of its original speed
    • Unit - Pause caster
    • Unit - Pause enemy
    • Unit - Make caster Invulnerable
    • Unit - Remove Storm Crow Form From caster
    • Wait 2.00 seconds
    • Special Effect - Create a special effect attached to the chest of caster using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
    • Special Effect - Destroy (Last created special effect)
    • Unit - Move caster instantly to enemy_loc
    • Animation - Change caster flying height to 0.00 at 1000.00
    • Wait 0.20 seconds
    • Animation - Player caster's Attack animation
    • Unit - Make caster Vulnerable
    • Unit - Unpause caster
    • Unit - Unpause enemy
    • Animation - Change caster's animation speed to 100.00% of its original speed
    • Wait 0.20 seconds
    • Unit - Cause caster to damage enemy, dealing 500.00 damage of attack type Hero and damage type Normal
    • Custom script: call RemoveLocation (udg_caster_loc)
    • Custom script: call RemoveLocation (udg_enemy_loc)
the variable solves the problem... thanks you 2 + rep for you
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
No, not the variable solves the problem (it solved it, but it's not the main reason), it's that (Triggering unit) solves it.

The trigger "forgets" it after a use of Wait action (as mentioned by Maker) and only (Triggering unit) function will remember its call and it is MUI if we use Wait in a single trigger with (Triggering unit)

Also in this case, variable also solved the problem by saving the data and therefore, the game will recognize which unit because you already saved it as data

Although, change your (Casting unit) to (Triggering unit) if you wanna make a better and efficient trigger :)

Good luck
 
Status
Not open for further replies.
Top