I'm just a noob with JASS, i'm trying my best to comprehend but it seems that the slow way is still the best.
I'm trying to make a JASS version of this skill but I seems to fail.. My syntax is always wrong...
Trigger Version:
I'm trying to make a JASS version of this skill but I seems to fail.. My syntax is always wrong...
Trigger Version:
- Triggers:
- Unit - A unit Is attacked
-
Conditions
- ((Attacking unit) has buff Kusanagi Chidori ) Equal to True
-
Actions:
- Set Lycast = (Position of (Triggering unit))
- Unit - Create 1 Peasant for (Owner of (Attacking unit)) at Lycast facing (Facing of (Attacking unit)) degrees
- Unit - Hide (Last created unit)
- Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Attacked unit)
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Custom script: call RemoveLocation(udg_Lycast)
JASS:
function Trig_Lyghtning_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttacker(), 'A005') == true ) ) then
return false
endif
return true
return GetSpellAbilityId() == 'A004'
endfunction
function Trig_Lyghtning_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_Lyghtningi takes nothing returns nothing
set gg_trg_Lyghtning = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Lyghtning, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Lyghtning, Condition( function Trig_Lyghtning_Conditions ) )
call TriggerAddAction( gg_trg_Lyghtning, function Trig_Lyghtning_Actions )
local unit u = CreateUnitAtLoc(GetTriggerPlayer(), 'h002', GetSpellTargetLoc(), 0.00)
call SetUnitPositionLoc(GetLastCreatedUnit(), GetUnitLoc(GetTriggerUnit()))
set u = null
set s = null
Last edited: