1 [
ComponentEditorProps(
category:
"GameScripted/Test", description:
"Test component showcasing doing the replication from script the WRONG way")]
8 [
RplProp(condition: RplCondition.NoOwner)]
15 [
RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
18 Print(
"RPC RECEIVE: " + testNum, LogLevel.NORMAL);
22 override void EOnFrame(IEntity owner,
float timeSlice)
24 if (Debug.KeyState(KeyCode.KC_P))
26 Debug.ClearKey(KeyCode.KC_P);
27 int rndRPCNum = Math.RandomIntInclusive(0, 100);
32 Print(
"RPC SEND: " + rndRPCNum, LogLevel.NORMAL);
46 if (RplSession.Mode() == RplMode.Client)
63 Print(
"RPLPROP CHANGED: " +
m_iTest, LogLevel.NORMAL);
76 if (RplSession.Mode() != RplMode.Client)
78 m_iTest = Math.RandomIntInclusive(0, 100);
82 Print(
"RPLPROP CHANGE: " +
m_iTest);
89 SetEventMask(ent, EntityEvent.FRAME);
90 ent.SetFlags(EntityFlags.ACTIVE,
true);