Interaction

From The KillerJim Mod Wiki

PlayerProxy::Interaction

Interaction.png

Client Only Function - This API call can only be called on clients.

Description

For complete information please see the Interaction section.

Objects (props, level actors, etc.) that wish to be interacted with (such as pressing 'E' on) should use the interaction system provided by Modiverse. This system provides a scalable solution that works in Multiplayer.

The "Interaction" node is used when an event (such as a key press) should trigger a server-side action on an actor. If the actor inherits the "KJMod Interactable Object Interface" when the "Event Player Interacting" is executed (on the server-side) allowing authoritative actions to be performed.

Arguments
1 Player Controller playerController
The player controller that is interacting with the actor.
2 Actor interactingObject
The actor that you're wanting to interact with (should inherit the "KJMod Interactable Object Interface")
3 boolean Active
Whether the interaction is active; such as key press (true) or key release (false)
4 Key Input (optional) Key
The key (if any) that caused the interaction
5 integer Cookie
An optional cookie (meta data) that is sent; this integer value has no meaning to Modiverse and is sent transparently to the interacting actor. You can encode anything you want in here.

Playing

Developers

Developer Reference