KaerfNomekop
Swim, fishies. Swim through the veil of steel.
- Reaction score
- 613
JASS:
function Stun takes unit WhichUnit returns nothing
local location Point
set Point = GetUnitLoc(WhichUnit)
call CreateNUnitsAtLoc( 1, 039;u000039;, Player(PLAYER_NEUTRAL_AGGRESSIVE), Point, bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 1.00, 039;BTLF039;, GetLastCreatedUnit() )
call UnitAddAbilityBJ( 039;A00D039;, GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", WhichUnit )
call RemoveLocation (Point)
endfunction
'A00D' is an ability based off Storm Bolt and stuns perfectly, with a duration of 0.00 so that the buff can be manually removed.
I tried calling this function, but it doesn't work. The strange thing is that I made it with GUI actions, converted them and changed the variables. The original actions, however, work perfectly. Did I change something extra or miss something out?
EDIT: Apparently it was some error with calling the function directly onto preplaced units. Setting them to a variable and calling it on them instead worked fine.