• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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