• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Solved] Is there anyway to remove the attack ability ?

Status
Not open for further replies.
you need it gui right?
do this:
  • Custom script: local unit u = GetSpellTargetUnit()
  • Custom script: call UnitAddAbility( u, 'Abun')
  • Custom script: call TriggerSleepAction( 30.00 )
  • Custom script: call UnitRemoveAbility( u, 'Abun')
  • Custom script: set u = null
I write this from my head, if don't work, replace u and ability raw code places.

JASS:
local unit u = GetSpellTargetUnit() // We store target unit into local variable
call UnitAddAbility( u, 'Abun')  // We add 'Abun' (Cargo Hold) to unit
call TriggerSleepAction( 30.00 ) // Trigger wait action (jass version)
call UnitRemoveAbility( u, 'Abun') // We remove 'Abun' (Cargo Hold) to unit
set u = null // We null local unit (cleaning leaks)
 
Chucky: You can test it and let us know if it's.

If it's not MUI (Multi Instanceable) you can create a unit group, a hashtable, and a loop trigger :P OR Work with custom values and some indexing system
 
MUI spells are those that works correctly even when multiple units casts them at the same time.

To create MUI abilities you have to create and handle things the most "generic" way, and leave the "hard work" to the game system. It's something like

· "Pick every Player in (All Players)" is better than doing 12 actions for Player 1, 2, 3...
· If you use "FlameStrike Caster = Triggering Unit" the variable will take a new value if some other unit casts it.
· Hashtables / JASS Locals / Avoiding Wait actions / A Good Indexing System / Using JASS Native Functions are suggestions (nearly "requirements") in order to create MUI Abilities.
· This is motly required for abilities with over time effect (Like Missile Moving, Damage over Time, Unit moving, etc.). Simple abilities like Finger of Death (Lion's Ultimate in DotA), Centaur's War Stomp, Panda's Clap, are instant and doesn't require anything to make them MUI.
 
Status
Not open for further replies.
Back
Top