• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Solved] Making a "Cleansing" Ability

Status
Not open for further replies.
Level 1
Joined
Nov 22, 2018
Messages
6
Hi, first-timer here, how do I make an ability which remove stun upon cast? I had created a trigger which remove all debuffs upon cast but the only debuff cannot be removed is "stun". Also, is there any ability that works while under the "stunned" effect?

Thanks you for helping and sorry for my bad english.
 
Basic spells do not remove Stuns, cause of buff/removage types. Use the Trigger Actions they do when set correctly.

You can't order an unit which is stuned, cause thats how stun works: Disable performing new orders until not stuned anymore.
Edit: Except Super Instants, this ability button presses are noticed and fire events but won't execute.​

One can detect the moment an unit is stuned/pause with an order event.
OrderId = 851973
Target Order = Stuned
Point Order = Paused
Hint: Cyclone, Sleep are also using the "stun" mechanic. (Sleep starts an paused Event)

An stuned/paused units current order is equal to that OrderId for the whole duration.
 
Last edited:
Level 1
Joined
Nov 22, 2018
Messages
6
Basic spells do not remove Stuns, cause of buff/removage types. Use the Trigger Actions they do when set correctly.

You can't order an unit which is stuned, cause thats how stun works: Disable performing new orders until not stuned anymore.

One can detect the moment an unit is stuned/pause with an order event.
OrderId = 851973
Target Order = Stuned
Point Order = Paused
Hint: Cyclone, Sleep are also using the "stun" mechanic. (Sleep starts an paused Event)

An stuned/paused units current order is equal to that OrderId for the whole duration.

Could you please elaborate on that? There are many stuffs about the trigger editor I do not understand...
 
Buffs are either harming or benefiting.
Also buffs are either magical, physical or ultimative (this word is not used in the editor, but it is a good way to describe it).
The Basic spells like purge/dispell magic... are only removing magical buffs.

But stuns provided by stormbolt, warstomp, bash ... are ultimative. To cleanse them one needs to remove buff specific like remove: "stun", "stun (pause)" or do something like that:
  • Purge all Negatives but none aura
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Purge (Neutral Hostile)
    • Actions
      • Unit - Remove Negative buffs considered Magic or physical(also ultimative) from (Target unit of ability being cast) (Exclude expiration timers, Exclude auras)
 
Level 1
Joined
Nov 22, 2018
Messages
6
Well, that is what I did with my trigger but I want the ability to take effect immediately upon cast (Like berserk ability) and only affect "self", is there other way to do it? Though, I thank you for taking the time to show me.
 
One could use an different execution event.
As previous said: An unit can not perform/start an new order as long as stuned.

Possible other Events are:
  • ESC (skip cinematic)
  • Stun Event (auto cleanse) ( which is an Order Event with an specific OrderId)
  • Unit Selection.
For Esc/Selection one also needs to filter units you do not have access to.
When the cleanse ability/Timer is not on cooldown, cleanse the stuns and order the ability/start the timer.
 
Level 1
Joined
Nov 22, 2018
Messages
6
One could use an different execution event.
As previous said: An unit can not perform/start an new order as long as stuned.

Possible other Events are:
  • ESC (skip cinematic)
  • Stun Event (auto cleanse) ( which is an Order Event with an specific OrderId)
  • Unit Selection.
For Esc/Selection one also needs to filter units you do not have access to.
When the cleanse ability/Timer is not on cooldown, cleanse the stuns and order the ability/start the timer.

I might be too dumb to understand your advice because the truth is I do not know which corresponding Condition and Action should I use in conjunction with the Events. Can you show me how?
 
Level 7
Joined
Apr 17, 2017
Messages
316
Fyi, the first thing that came to my mind was creating a spell based on spellbook ability, because you can click on it even when you are stunned or etc. However spellbooks can't be triggered in terms of casting ability or order id because they have none.
 
Level 1
Joined
Nov 22, 2018
Messages
6
If you're new to triggers I think you're in over your head for such a system

Even if not, I'd say it is not worth the effort. But that's just me

You're right, I should learn the ropes first, BTW I thank you all for the advice.:)
 
Level 20
Joined
May 16, 2012
Messages
635
You could use a Stun System, here is one :[GUI]Simple Stun System v1.1 [Legend is back]

lets say you want to remove the stun from a unit stunned by storm bolt. Set the duration of the storm bolt ability stun to 0 in the object editor and then, through trrigers you stun the unit for the duration you want using the system, and in case you want to remove the stun you use the functionality of the system to do so. The creator of the system explains how to do it.
 
Have to take back my talk form earlier, in this thread.

Recently I got an Idea and did now some testing. Units beeing Stuned can produce non-target events by themself in 2 ways if they got speicfic abilities.
One can not cast spells while beeing Stuned and most orders won't fire events.

But all spells based on super instants (windwalk, divine shield, manashield, immolation, defend, berserk...) fire a non target event, even during stun. This Order won't be executed cause stun. But the Event notices the ability button click, fires and you can do stuff based on it. If you free the unit from disables during that event it will also execute the spell.

Edit: Berserk and defence are proably the best bases, causes they are also immune to basic silence not sure about beeing banished (etherial) although.

  • Divine Shield useable during stun
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Level of Gottesschild for (Triggering unit)) Not equal to 0
      • (Issued order) Equal to (Order(divineshield))
    • Actions
      • Unit - Remove Negative buffs from (Triggering unit)
Also there is another way with toggleing autocasts, there is an selfautocast spell "Frenzy" best option in that case. I had this idea first but it is not as good as the super Instants. Cause you need to check for 2 Orders, check remaining cooldown and make sure the user does not stop casting when freed by toggleing autocast. UnFrenzy / Frenzy
  • Raserei Toogle
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Level of Raserei for (Triggering unit)) Not equal to 0
      • (Ability Cooldown Remaining of (Triggering unit) for ability Raserei) Less than or equal to 0.00
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(frenzyoff))
          • (Issued order) Equal to (Order(frenzyon))
    • Actions
      • Custom script: set udg_OrderId = GetUnitCurrentOrder(GetTriggerUnit())
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • OrderId Equal to 851973
        • Then - Actions
          • Unit - Remove Negative buffs from (Triggering unit)
          • Custom script: call IssueImmediateOrder(GetTriggerUnit(), "frenzy")
        • Else - Actions
 
Last edited:
Level 1
Joined
Nov 22, 2018
Messages
6
Have to take back my talk form earlier, in this thread.

Recently I got an Idea and did now some testing. Units beeing Stuned can produce non-target events by themself in 2 ways if they got speicfic abilities.
One can not cast spells while beeing Stuned and most orders won't fire events.

But all spells based on super instants (windwalk, divine shield, manashield, immolation, defend, berserk...) fire a non target event, even during stun. This Order won't be executed cause stun. But the Event notices the ability button click, fires and you can do stuff based on it. If you free the unit from disables during that event it will also execute the spell.

Edit: Berserk and defence are proably the best bases, causes they are also immune to basic silence not sure about beeing banished (etherial) although.

  • Divine Shield useable during stun
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Level of Gottesschild for (Triggering unit)) Not equal to 0
      • (Issued order) Equal to (Order(divineshield))
    • Actions
      • Custom script: set udg_OrderId = GetUnitCurrentOrder(GetTriggerUnit())
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • OrderId Equal to 851973
        • Then - Actions
          • Unit - Remove Negative buffs from (Triggering unit)
        • Else - Actions
Also there is another way with toggleing autocasts, there is an selfautocast spell "Frenzy" best option in that case. I had this idea first but it is not as good as the super Instants. Cause you need to check for 2 Orders, check remaining cooldown and make sure the user does not stop casting when freed by toggleing autocast. UnFrenzy / Frenzy
  • Raserei Toogle
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Level of Raserei for (Triggering unit)) Not equal to 0
      • (Ability Cooldown Remaining of (Triggering unit) for ability Raserei) Less than or equal to 0.00
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(frenzyoff))
          • (Issued order) Equal to (Order(frenzyon))
    • Actions
      • Custom script: set udg_OrderId = GetUnitCurrentOrder(GetTriggerUnit())
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • OrderId Equal to 851973
        • Then - Actions
          • Unit - Remove Negative buffs from (Triggering unit)
          • Custom script: call IssueImmediateOrder(GetTriggerUnit(), "frenzy")
        • Else - Actions
I can't thank you enough for these! These triggers work like a charm!:):)
 
on a second though the stun check is not needed for the divine shield trigger, silly me.

Edit:
But it is needed for the toggleing, another bad point for them.
Super instants beat them like nothing, except your unit already expleted all of them.

I also though about item activations, cause item uses do not order the ability orderstring and have to be handled different:
Here one would need to convert order to used item from inventory, get that items itemTypeId and compare it to a list of itemTypes which are allowed disable self/cleanser. If the item is inside the list cleanse the unit .

stuff one would use
JASS:
local integer spellOrder = GetIssuedOrderId()
local boolean itemSpell  = ( spellOrder >= 852008 and spellOrder <= 852013)
local item usedItem      = UnitItemInSlot(caster, spellOrder - 852008)

Some wierd sidenote: the basic divine shield items are no super instants.
 
Last edited:
Status
Not open for further replies.
Top