I have a map decoration item I am coding and I need it to call a function (PlayerCalcView) in the local player pawn, and only the local player pawn of the local machine. The FX of the decoration will change and be different to each of the players, depending on their viewing location.
I know how to do it in UT2k4 script, and want to reproduce the same effect in UT99.
From the UT2k4 code
I know how to do it in UT2k4 script, and want to reproduce the same effect in UT99.
From the UT2k4 code
Code:
// UT2k4 script example in map decoration
var PlayerController localPlayer;
simulated function PostBeginPlay() {
if (Level.NetMode == NM_DedicatedServer)
{
Disable('Tick');
}
LocalPlayer = Level.GetLocalPlayerController();
}
simulated event Tick(float d) {
local actor MyA;
local vector MyV;
local rotator MyR;
if (LocalPlayer == None)
{
LocalPlayer = Level.GetLocalPlayerController();
if (LocalPlayer == None) return;
}
LocalPlayer.PlayerCalcView(MyA,MyV,MyR);
//do the FX stuff here
}
Last edited: