client_id
The unique identification number of the client who has created this entity; also serves as the
VIEW* pointer for a layered entity.
Type:
var
Remarks:
- On a server, this variable is automatically set on all entites created by a client.
- On a client,
this variable is set to a negative value until the server confirmed the creation of a global entity and the handle becomes valid. Then client_id is set to dplay_id.
- On view entities, this variable can be set to a view pointer
for using the aspect, arc,
and bmap
parameters from this view. Otherwise the camera parameters are used.
- On sky entities, this variable can be set to a view pointer when the sky must only be visible in this view. Otherwise it's visible in all views.
- In all other cases, client_id is 0.
Examples:
// wait on a client until a just-created entity becomes valid
while(my.client_id != dplay_id) wait(1);
// send a variable from a server to the client that cretated the my entity
send_var_id(my.client_id,myvar);
// change the view of a view entity
viewent.client_id = camera;
See also:
send_var_id
, send_string_id, send_data_id, ent_createlayer
► latest
version online