• 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.

[JASS] Trigger help

Status
Not open for further replies.
Level 2
Joined
Jul 3, 2004
Messages
7
This is the trigger:
function Trig_Something_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, ChooseRandomCreepBJ(-1), Player(11), GetRectCenter(GetPlayableMapRect()), bj_UNIT_FACING )
call SetUnitState( GetLastCreatedUnit(), UNIT_STATE_MAX_LIFE, 100 )
endfunction

function InitTrig_Trigger takes nothing returns nothing
set gg_trg_Trigger = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Trigger, 2 )
call TriggerAddAction( gg_trg_Trigger, function Trig_Something_Actions )
endfunction

My problem is that the unit's maximum life SHOULD be set for 100, but it aint... And i really can't figure out why?!
 
Status
Not open for further replies.
Top