Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
RplComponent Interface Reference

Base class for entity replication - e.g. vehicles, characters, animals. More...

Inheritance diagram for RplComponent:
[legend]

Public Member Functions

proto external void GiveExt (RplIdentity newOwner, bool alwaysNotify)
 Gives ownership to newOwner if possible.
 
proto external void ForceNodeMovement (vector previousPos)
 Force scheduler to move node This is useful for nodes that do not have networked movement component, but are forcefully moved.
 
proto external void EnableStreaming (bool enable)
 Enable streaming for a specific entity.
 
proto external void EnableStreamingConNode (RplIdentity identity, bool enable)
 Enable streaming of node to a specific player.
 
proto external void EnableSpatialRelevancy (bool enable)
 

Static Public Member Functions

static proto void DeleteRplEntity (IEntity entity, bool releaseFromReplication)
 Deletes a replicated entity.
 
static proto void EnableStreamingForConnection (RplIdentity identity, bool enable)
 Enable streaming for a specific player.
 
static proto void InsertMPObserver (RplIdentity identity, float x, float z)
 
static proto void RemoveMPObserver (RplIdentity identity)
 

Detailed Description

Base class for entity replication - e.g. vehicles, characters, animals.

Member Function Documentation

◆ DeleteRplEntity()

static proto void RplComponent.DeleteRplEntity ( IEntity  entity,
bool  releaseFromReplication 
)
static

Deletes a replicated entity.

When called by the authority it removes the entity from replication delete the entity physically. If releaseFromReplication is true, once deleted from the replication on proxies they won't delete the entity physically.

When called by a proxy no physical delete happens until the authority deletes the entity. If releaseFromReplication is true the entity is marked and won't be deleted physically when deleted from the replication (unless the authority managed to tell the proxy the entity was deleted on the server already).

Parameters
pEntityEntity to delete
releaseFromReplicationWhen true after the entity is deleted from replication it won't be deleted from the game.

◆ EnableSpatialRelevancy()

proto external void RplComponent.EnableSpatialRelevancy ( bool  enable)

◆ EnableStreaming()

proto external void RplComponent.EnableStreaming ( bool  enable)

Enable streaming for a specific entity.

This takes precedence over EnableStreaming for a specific Connection or Connection/Node

Warning
Works only if Network Dynamic Simulation is enabled
Parameters
enableIf true streaming is enabled.

◆ EnableStreamingConNode()

proto external void RplComponent.EnableStreamingConNode ( RplIdentity  identity,
bool  enable 
)

Enable streaming of node to a specific player.

Respects disabled connection rules, respects disabled nodes rules

Warning
Works only if Network Dynamic Simulation is enabled
Parameters
identityClient connection
enableIf true streaming is enabled.

◆ EnableStreamingForConnection()

static proto void RplComponent.EnableStreamingForConnection ( RplIdentity  identity,
bool  enable 
)
static

Enable streaming for a specific player.

Ignores Connection/Node rules, but respects disabled nodes

Warning
Use with caution. This could can cause performance issues if used by many players.
Parameters
identityClient connection
enableIf true streaming is enabled.

◆ ForceNodeMovement()

proto external void RplComponent.ForceNodeMovement ( vector  previousPos)

Force scheduler to move node This is useful for nodes that do not have networked movement component, but are forcefully moved.

To be used only in special cases.

Warning
Works only if Network Dynamic Simulation is enabled
Parameters
previousPosprevious position to move the node from

◆ GiveExt()

proto external void RplComponent.GiveExt ( RplIdentity  newOwner,
bool  alwaysNotify 
)

Gives ownership to newOwner if possible.

Also notifies listeners if possible. Unlike Give this supports also custom data passing between the old and the new owner.

Warning
This method might be replaced by a unified Give method in the future. Use with caution.
Parameters
newOwnerNew owner.
alwaysNotifyNotifies listeners even if no change in ownership happened.

◆ InsertMPObserver()

static proto void RplComponent.InsertMPObserver ( RplIdentity  identity,
float  x,
float  z 
)
static

◆ RemoveMPObserver()

static proto void RplComponent.RemoveMPObserver ( RplIdentity  identity)
static

The documentation for this interface was generated from the following file: