1[
ComponentEditorProps(
category:
"GameScripted/Test", description:
"Test component showcasing doing the replication from script the RIGHT way")]
16 private int m_iTest = 0;
23 void Do_TestRpc(
int testNum)
32 void RpcAsk_TestRpc(
int testNum)
35 Rpc(RpcDo_TestRpc, testNum);
49 void RpcDo_TestRpc(
int testNum)
51 Print(
"RPC NetTestRpc EXECUTED: " + testNum,
LogLevel.NORMAL);
58 void RpcAsk_ChangePropValue(
float timeSlice)
60 m_fdelay -= timeSlice;
68 m_iTest = Math.RandomIntInclusive(0, 100);
70 Print(
"RPLPROP m_iTest CHANGED on SERVER: " + m_iTest,
LogLevel.NORMAL);
78 Print(
"RPLPROP m_iTest CHANGED on CLIENT: " + m_iTest,
LogLevel.NORMAL);
91 void RpcAsk_TestFire()
115 void RpcDo_TestFire()
123 super.OnPostInit(owner);
142 int rndRPCNum = Math.RandomIntInclusive(0, 100);
148 Rpc(RpcAsk_TestRpc, rndRPCNum);
152 Rpc(RpcAsk_ChangePropValue, timeSlice);
164 Rpc(RpcAsk_TestFire);
176 void SCR_RplTestComponent(IEntityComponentSource src,
IEntity ent,
IEntity parent)
SCR_RplTestComponentClass m_CharacterOwner
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
SCR_CacheNoteComponentClass ScriptComponentClass RplProp()] protected ref array< string > m_aLines
RplComponent m_RplComponent
enum EVehicleType IEntity
proto external int SetEventMask(notnull IEntity owner, int mask)
void Rpc(func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
proto external EntityFlags SetFlags(EntityFlags flags, bool recursively=false)
void EOnFrame(IEntity owner, float timeSlice)
void EOnInit(IEntity owner)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
EntityEvent
Various entity events.
EntityFlags
Various entity flags.
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
RplCondition
Conditional replication rule. Fine grained selection of receivers.
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.