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

Cjass help

Status
Not open for further replies.
Level 6
Joined
Mar 2, 2013
Messages
127
Is there a condition to check if the player is still in the game or not.

function Death_Match_C takes nothing returns boolean
return IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true and GetUnitAbilityLevel(GetTriggerUnit(),'ACLN') == 0 and IsUnitIllusion(GetTriggerUnit()) == false and
IsUnitInGame = true <------Something like this
endfunction
 
Level 6
Joined
Mar 2, 2013
Messages
127
IsUnitType(whichUnit, UNIT_TYPE_DEAD)
Try this if I am not mistaken.

Not Sure that would work because the heros come back to life, even though they left.

To check if the player has left.
GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_LEFT

This should work
but instead of player(0) could it be the triggering unit? or do i have to do that for every player?
 
Status
Not open for further replies.
Top