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

Appearing an emergency mark over the unit during the casting time of spell

Status
Not open for further replies.
Level 11
Joined
Jul 17, 2013
Messages
544
Hi i want a emergency mark (i mean ! ) to appear on the caster when he starts casting ability, the emergency mark should be gone when he starts effect of the ability


i did something like this
upload_2020-8-21_23-18-0.png


upload_2020-8-21_23-18-27.png



what happens in game? when i tested it the game waits the 3 seconds of casting time and then it appears the special effect on the unit. but i would like the speciall effect to appear only during casting time. any idea how to fix it?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,579
EDIT:
Updated and fixed.

Order of cast Events:
--- Happens before Cast Time ---
1) Begins channeling an ability

--- Happens after Cast Time ---
2) Begins casting an ability
3) Starts the effect of an ability
4) Finishes casting an ability
5) Stops casting an ability
(Not 100% sure about 4/5)

So you can use begins channeling an ability like so:
  • Begin Casting
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to YourSpell
    • Actions
      • Set Variable cv = (Custom value of (Triggering unit))
      • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
      • Set Variable Channel_Sfx[cv] = (Last created special effect)
  • Stop
    • Events
      • Unit - A unit Stops casting an ability
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to YourSpell
    • Actions
      • Set Variable cv = (Custom value of (Triggering unit))
      • Custom script: if udg_Channel_Sfx[udg_cv] != null then
      • Special Effect - Destroy Channel_Sfx[cv]
      • Custom script: set udg_Channel_Sfx[udg_cv] = null
      • Custom script: endif
I also use a Unit Indexer (I think you already have one in your map) to keep track of the Special Effects.
 

Attachments

  • Channel Example 2.w3m
    17.3 KB · Views: 17
Last edited:
Status
Not open for further replies.
Top