• 🏆 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] Another spell

Status
Not open for further replies.
Level 8
Joined
Jul 28, 2008
Messages
211
I saw a spell inside a turorial and i wanted to try and make my own spell. But it doesn't work.

Here's the spell:

  • Rage Cast
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Rage
    • Actions
      • Custom script: local unit udg_Caster
      • Custom script: local effect udg_Effect1
      • Custom script: local effect udg_Effect2
      • Custom script: local effect udg_Effect3
      • Set Caster = (Triggering unit)
      • Special Effect - Create a special effect attached to the weapon of Caster using Abilities\Spells\Orc\TrollBerserk\HeadhunterWEAPONSLeft.mdl
      • Set Effect1 = (Last created special effect)
      • Special Effect - Create a special effect attached to the chest of Caster using Abilities\Spells\Other\Drain\DrainTarget.mdl
      • Set Effect2 = (Last created special effect)
      • Special Effect - Create a special effect attached to the overhead of Caster using Abilities\Weapons\NecromancerMissile\NecromancerMissile.mdl
      • Set Effect3 = (Last created special effect)
      • Unit - Add Rage Life to Caster
      • Unit - Add Rage Speed to Caster
      • Unit - Add Rage Damage to Caster
      • Unit - Add Rage Drain to Caster
      • Wait 20.00 seconds
      • Special Effect - Destroy Effect1
      • Special Effect - Destroy Effect2
      • Special Effect - Destroy Effect3
      • Unit - Remove Rage Damage from Caster
      • Unit - Remove Rage Life from Caster
      • Unit - Remove Rage Drain from Caster
      • Unit - Remove Rage Speed from Caster
The caster is supposed to gain a few skills like life drain, attack speed and damage bonus and a negative life regen. Can someone tell me what did i do wrong?

Thx in advance :wink:thumbs_up:
 

Attachments

  • rage.w3x
    14 KB · Views: 64
Last edited:
I tried all of those but it didn't work...so at the end i tried to make it like in the turorial (it was beggins channeling) and it still didn't work. The effect on the weapon appears, but nothing more happens.

well, if the trigger was firing, then the abilities would be added on the the unit, so perhaps there is something about the abilities that wouldn't be added to the hero?
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,178
You bugged the function.
Basically each function only supports 1 local with the same name as a global. Anymore causes serious and major errors. You used clearly more than 1 thus serious and major errors occured so it did not work.

Upgrade to full JASS and use propperly local locals, or use the new hashtable natives (available in GUI in the newest beta patch or future patch) to store the values onto a unit and then recall them later.

Also use gametime wait (polledwait) not TriggerSleepAction wait as polledwait maintains some form of real time accuracy unlike TriggerSleepAction (even though it uses it as well).
 
Status
Not open for further replies.
Top