[Edit] whops, sorry for double post didn't notice I wasn't on edit lol.
-
Untitled Trigger 002
-

Events
-


Unit - A unit Starts the effect of an ability
-

Conditions
-


(Ability being cast) Equal to Animate Dead
-

Actions
-


Player - Enable Acid Bomb for (Owner of (Triggering unit))
-


Wait 6.00 seconds
-


Player - Disable Acid Bomb for (Owner of (Triggering unit))
The ability should be which ever one you want.
Since this isn't MUI, ill give you the custom script code with a local variable which makes this MUI (don't start crying its just this trigger + 2 lines

)
Code:
function Trig_[COLOR="Lime"]Untitled_Trigger_002[/COLOR]_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AUan' ) ) then
return false
endif
return true
endfunction
function Trig_[COLOR="Lime"]Untitled_Trigger_002[/COLOR]_Actions takes nothing returns nothing
[COLOR="Red"]local unit u = GetTriggerUnit()[/COLOR]
call SetPlayerAbilityAvailableBJ( true, 'ANab', GetOwningPlayer([COLOR="red"]u[/COLOR]) )
call TriggerSleepAction( 6.00 )
call SetPlayerAbilityAvailableBJ( false, 'ANab', GetOwningPlayer([COLOR="red"]u[/COLOR]) )
[COLOR="red"]set u = null[/COLOR]
endfunction
//===========================================================================
function InitTrig_[COLOR="lime"]Untitled_Trigger_002[/COLOR] takes nothing returns nothing
set gg_trg_[COLOR="lime"]Untitled_Trigger_002 [/COLOR]= CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( [COLOR="lime"]gg_trg_Untitled_Trigger_002[/COLOR], EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_[COLOR="lime"]Untitled_Trigger_002[/COLOR], Condition( function Trig_[COLOR="lime"]Untitled_Trigger_002[/COLOR]_Conditions ) )
call TriggerAddAction( gg_trg_[COLOR="lime"]Untitled_Trigger_002[/COLOR], function Trig_[COLOR="lime"]Untitled_Trigger_002[/COLOR]_Actions )
endfunction
The
red parts are the changes.
You add a local, change "GetTriggerUnit()" to "u" (at those 2 red "u"s) and then null u.
I suggest you to NOT copy this code because it will not work for you unless your trigger is called "Untitled Trigger 002" and I guess you don't want it to be called like this ?
If you still want to copy it, change all the
green parts to your trigger name ( "_" is a space so if your trigger is called "I Am Cool", in custom script it'll be "I_Am_Cool").
Rawcodes
In case you don't know whats a rawcode, take an example at the start of that code there is this line
"if ( not ( GetSpellAbilityId() ==
'AUan' ) ) then"
The
purple part is the rawcode of Animate Dead.
So, if you want to change it to your own abilitie's rawcode, you'll need to go to the Object Manager, click Ctrl+D (click Ctrl+D again to disable this) and it will change the abilities/items/units and everything else's names to rawcodes.
Now just change it.
The first rawcode is the ability the unit casts, the second and third ones are the disabled speed passive ability.
[Notes]
- your ability should be inside a disabled spell book if you don't want the players to see it.
Click
here to learn more on spell books and how to create invisible passive abilities.
- Be sure to disable your ability at the start of the game (0.00).