Once again, back to AwesomeWeaponUpgrade
.
Let's change the
PostBeginPlay
function a bit:simulated function PostBeginPlay() { `log("PostBeginPlay===================="); if(Role == ROLE_Authority) `log("I am running on the server!"); else `log("I am running on the client!"); }
Compile the code.
Run the server and the client. Now let's take a look at what happens.
Run to the trigger, then take a look at the server's log:
[0014.57] ScriptLog: PostBeginPlay==================== [0014.57] ScriptLog: I am running on the server!
Now let's take a look at the client:
[0010.53] ScriptLog: PostBeginPlay==================== [0010.53] ScriptLog: I am running on the client!