Time for action – COMBO BREAKER!
We're going to chain a few events together and see what happens on the server and on the client. We'll start with PostBeginPlay
.
Let's add a line to our
PostBeginPlay
function:simulated function PostBeginPlay() { `log("PostBeginPlay===================="); NumberOne(); }
Now let's write the
NumberOne
function. We'll use thesimulated
modifier on it and have it call the next function in the chain:simulated function NumberOne() { `log("NumberOne========================"); NumberTwo(); }
Now for
NumberTwo
, we'll leave out thesimulated
modifier:function NumberTwo() { `log("NumberTwo========================"); NumberThree(); }
And finally, that non-simulated function will call a simulated
NumberThree
:simulated function NumberThree() { `log("NumberThree========================"); }
Compile the code.
Now, before we run it, what is your guess as to what will show on the client and what will show on the server? We know that simulated functions...