- Joined
- Feb 4, 2008
- Messages
- 3,511
I have this script (It isn't optimized yet):
And for some reason i get this bug:
I have JassHelper 0.9.1.2 and jassnewgenpack5d
JASS:
function isNight takes nothing returns boolean
if GetFloatGameState(GAME_STATE_TIME_OF_DAY) <= 6.00 and GetFloatGameState(GAME_STATE_TIME_OF_DAY) >= 18.00 then
return true
endif
return false
endfunction
function Trig_Unkillable_Actions takes nothing returns nothing
local unit target = udg_DamageEventTarget
if GetUnitTypeId(udg_DamageEventTarget) == 'n000' and GetUnitState(target, UNIT_STATE_LIFE) <= udg_DamageEventAmount and isNight == true then
set udg_DamageEventAmount = 0.00
call SetUnitLifePercentBJ( target, 100 )
call SetUnitInvulnerable( target, true )
call PauseUnit( target, true )
call SetUnitAnimation(target, "death" )
endif
endfunction
//===========================================================================
function InitTrig_Unkillable takes nothing returns nothing
set gg_trg_Unkillable = CreateTrigger( )
call TriggerRegisterVariableEvent( gg_trg_Unkillable, "udg_DamageModifierEvent", EQUAL, 1.00 )
call TriggerAddAction( gg_trg_Unkillable, function Trig_Unkillable_Actions )
endfunction
And for some reason i get this bug:
I have JassHelper 0.9.1.2 and jassnewgenpack5d
Attachments
Last edited by a moderator: