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

Ability based on same spell

Status
Not open for further replies.
Level 15
Joined
Nov 30, 2007
Messages
1,202
Is there any way to distinguish which of two spells based on the same ability was cast? I really love that berserk is instant cast, I happen to need 11 more such abilities that are instant or almost instant. Any suggestions?

This will always return 3:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Next Window 2
        • Then - Actions
          • Game - Display to (All players) the text: 2
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Next Window 3
        • Then - Actions
          • Game - Display to (All players) the text: 3
        • Else - Actions
This is the list of spells I have so far that are instant with no target:

Berserk
Devine shield (cant remove sound for when invul shield is destroyed)
Avatar
Metamorphis (requires morph back unit configuration)
Windwalk
Storm Earth and Fire

Defend (Does not trigger ability event, and would need immediete undefend)
Robo transform (requires work around)
 
Last edited:
Basically you could base all spells on channel, and then only change the used order string. Have a look in OrderType, inside the onInit function. You might try to use also both, "on" and "off" orders, not sure I've tried this though.

I made there some difference for the order category "no-target" orders, to say which orders are really instant, and which are "queue" orders, meaning they will simply re-order the old order after casting time/ a very short moment.
 
Level 15
Joined
Nov 30, 2007
Messages
1,202
Your abilities are called Next Window 2 / Next Window 3. That makes me think that it could be done with Spellbook abilities. Have you looked into that?

Its ability behaviour that I'm trying to control. Some abilities have a casting time even if you set it to 0 roar for example takes at least 0.5 seconds to perform. I'm looking for abilities that are instant or almost instant.
 

Antares

Spell Reviewer
Level 21
Joined
Dec 13, 2009
Messages
512
I understand that. What I was suggesting is that you use Spellbook to access Window 2 / Window 3 etc. It's also instant. It depends on what your abilities do whether this could work or not.

My other suggestion would be to use say three spellbooks, each with 4 spells that you base on Berserk, Divine Shield etc. Since spells across multiple spellbooks can both be based on the same ability, you would reduce the number of abilities that you need to base them on.

What might also work is this:
The unit has an ability based on say Thunderclap. You register when the unit is ordered to use Thunderclap, then you remove that ability, you add the appropriate Berserk ability, then you order it to use Berserk. I'm not 100% sure, but this should also be instant.
 
Level 3
Joined
Nov 12, 2018
Messages
43
Immolation and Manashield should work too. But you need to deactivate it right afterwards.
 
Status
Not open for further replies.
Top