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

Casting system

Status
Not open for further replies.
Level 2
Joined
Sep 27, 2009
Messages
15
So I've been working on a casting system, but im a bit stuck now.

What im going for is that an enemy unit starts casting an ability, and after 3-5 seconds it fires, giving you the time to interrupt it with a stun. A floating text above the unit's head will appear saying how long you have before the spell fires. I've added the casting time in the object editor.

This is what I have so far:

  • Spell countdown
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Freezing Blast
    • Actions
      • Floating Text - Create floating text that reads Frostbolt: 4 above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
      • Wait 1.00 seconds
      • Floating Text - Create floating text that reads Frostbolt: 3 above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
Etc.

Now I need to make the stuff for the actual interrupting. After the casting is interrupted, the countdown needs to stop and the ability needs to be put on cooldown.

For putting the ability on cooldown, I figured this:
  • Ability cooldown
    • Events
      • Unit - |cff8a2be2Six|r 0088 <gen> Starts the effect of an ability
    • Conditions
      • (Unit-type of (Target unit of ability being cast)) Equal to Blue Dragonspawn Sorcerer
      • (Ability being cast) Equal to Snap kick
    • Actions
      • Unit - Remove Freezing Blast from (Target unit of ability being cast)
      • Wait 5.00 seconds
      • Unit - Add Freezing Blast to (Target unit of ability being cast)
Besides not working, im missing a way to detect that the enemy is casting his ability. I also need a way to stop the countdown, after the interrupt.

Im new at this whole shabang so all pointers are welcome.
 
Status
Not open for further replies.
Top