Vp join: Difference between revisions

From Virtual Paradise Wiki
Jump to navigation Jump to search
Sleepy E (talk | contribs)
Basic layout
 
Sleepy E (talk | contribs)
mNo edit summary
Line 8: Line 8:
   {{sdk return code row|RC_TIMEOUT|Join request timeout (no accept/decline within 30 seconds)}}
   {{sdk return code row|RC_TIMEOUT|Join request timeout (no accept/decline within 30 seconds)}}
|returnattributes=
|returnattributes=
   {{sdk attribute row|int   |JOIN_ID    |Join id}}
   {{sdk attribute row|int   |JOIN_ID    |Join id}}
   {{sdk attribute row|int   |USER_ID    |User id}}
   {{sdk attribute row|int   |USER_ID    |User id}}
   {{sdk attribute row|float |JOIN_NAME  |Name of user}}
   {{sdk attribute row|string |JOIN_NAME  |Name of user}}
   {{sdk attribute row|float |JOIN_X    |User x coordinate}}
   {{sdk attribute row|float |JOIN_X    |User x coordinate}}
   {{sdk attribute row|float |JOIN_Y    |User y coordinate}}
   {{sdk attribute row|float |JOIN_Y    |User y coordinate}}
   {{sdk attribute row|float |JOIN_Z    |User z coordinate}}
   {{sdk attribute row|float |JOIN_Z    |User z coordinate}}
   {{sdk attribute row|float |JOIN_YAW  |User yaw angle}}
   {{sdk attribute row|float |JOIN_YAW  |User yaw angle}}
   {{sdk attribute row|float |JOIN_PITCH |User pitch angle}}
   {{sdk attribute row|float |JOIN_PITCH |User pitch angle}}
   {{sdk attribute row|float |JOIN_WORLD |World that user is in}}
   {{sdk attribute row|string |JOIN_WORLD |World that user is in}}
|behavior=
|behavior=
* Upon sending a request, {{sdk event|JOIN}} is triggered for the user. See {{sdk method|event_set}}.
* Upon sending a request, {{sdk event|JOIN}} is triggered for the user. See {{sdk method|event_set}}.

Revision as of 23:02, 14 December 2016

Method call snippet vp_join(instance, user_id);

Send a join request to a user.

Parameters

These are the parameters that this method requires:

Parameter Usage
VPInstance
instance
Pointer to the instance this method call is intended for
int
user_id
User id

Returns

This method returns a return code integer, which indicates whether the call was successful or errored for any reason:

Return code Cause
VP_RC_SUCCESS Successful call (for methods that have a registered callback, it only means the request has been sent)
VP_RC_NOT_IN_UNIVERSE Bot is not currently in the universe
VP_RC_JOIN_DECLINED Join request was declined
VP_RC_RC_TIMEOUT Join request timeout (no accept/decline within 30 seconds)

The following attributes will be returned in VP_CALLBACK_JOIN if the operation was successful:

Attribute Usage Also returned for
VP_JOIN_ID Join id
VP_USER_ID User id
VP_JOIN_NAME Name of user
VP_JOIN_X User x coordinate
VP_JOIN_Y User y coordinate
VP_JOIN_Z User z coordinate
VP_JOIN_YAW User yaw angle
VP_JOIN_PITCH User pitch angle
VP_JOIN_WORLD World that user is in

Behavior

Examples

   ...

See also