Get instance of other_player from player_id?

Posted by aridale
How would you do that? I have the player_id but I cant figure out a way to translate that into that players object instance

Replies (1)

Last message on 24 Apr 2019

Size43 (Administrator) on 24 Apr 2019, 11:50:24
You'll have to iterate over all objects. Something like:

///scr_player_id_to_instance(player_id)
var to_find = argument0;
with obj_other_player
{
    if player_id = to_find
    {
        return id
    }
}
return noone