Help with kills

Posted by Chibi
So i was trying to use the code on the example
Code : //Check whether we created the instance.. ..or the instance was created by someone on the
// same team.
if(other.owner != gms_self_playerid() && !gms_team_player_is_friend(other.owner))
{
//If we didn't create the instance & it wasn't created by someone on the same team..
//..we get hit.
health -= 10;
effect_create_above(ef_explosion, x, y, 0, c_red);

if(health < 0)//Show a message "... was killed by ..."
{
gms_chat(" was killed by " + gms_other_get_string(other.owner, "name"), c_red);
gms_p2p_send(p2p_kill, other.owner);
instance_destroy();
}

with(other)
instance_destroy();
}

I get a error when I implement it on my game, it says that the variable owner doesn't exist.
Can anyone help with this ?
Thanks
EDIT: SOLVED

Replies (0)

Last message on 28 Mar 2024