proc_local(ENTITY*,void *function)

proc_client(ENTITY*,void *function)

Assigns a client-side function to the given entity. Proc_local starts the given function on all clients, proc_client starts the function only on the client that has created the given entity or it's creator entity. Client-side entity functions can be used for detecting local mouse events, for starting local sound or particle effects, or for local entity animation. This can save a lot of bandwidth in a multiplayer system.

Parameters:

ENTITY* Entity to assign the function to.
function Function pointer to be run on the clients.

Remarks:

Example (lite-C:

// the following function sets the my entity invisible only on its creator client
function hide_me() { set(me,INVISIBLE); }
...
proc_client(me,hide_me);
...

See also:

connection, dplay_localfunction

► latest version online