VP_EVENT_OBJECT_CLICK

From Virtual Paradise Wiki
Revision as of 20:34, 25 August 2013 by Roy Curtis (talk | contribs) (Created page with "{{sdk event page|object_click|Received when an object is clicked by a client in the current world. |attributes= {{sdk attribute row|int |avatar_session|Session ID of objec...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Event set and handler snippet

vp_event_set(instance, VP_EVENT_OBJECT_CLICK, event_object_click);

void event_object_click(VPInstance instance) { }

Received when an object is clicked by a client in the current world.

Attributes

Attribute Usage
VP_AVATAR_SESSION Session ID of object's clicker
VP_OBJECT_ID Object's unique ID
VP_CLICK_HIT_X X coordinate of click
VP_CLICK_HIT_Y Y coordinate of click
VP_CLICK_HIT_Z Z coordinate of click

Behavior

  • This event is sent regardless of the receiver's distance relative to the clicked object or the clicker (i.e. global)

Caveats

Because this event only sends the ID of the clicked object, it is difficult to get that object's data unless:

  • The area around the clicking client is queried
  • The data is already known (e.g. if the receiver had created or queried the object)

Examples

This event has no usage examples; please add at least one to this page