Time for action – Setting up for the client function
The first thing we need to do is create a new map we can test with. The one we have is fine enough, but we need to change it a bit.
Open
AwesomeTestMap
in the editor.Delete the entire Kismet.
Optionally, delete all of the
AwesomeEnemySpawners
,TargetPoints
, and other actors on the map. Be sure to leave the player start, the ground, and the lights.Save the map as
AwesomeReplicationMap.udk
and close the editor.Now we can start programming. Open
AwesomePawn.uc
in ConTEXT.We'll be using a Toggle Kismet action on our
AwesomePawn
, so we need to add theOnToggle
function. For this experiment we don't need to worry about which input is being activated. For now, let's just put a log in the function:function OnToggle(SeqAct_Toggle InAction) { `log("I have been toggled!"); }
Compile the code and open
AwesomeReplicationMap
in the editor.Add a trigger near the player start.
Double-click on the Trigger to open up its properties, and uncheck Display...