Hello
Im am trying to Log the location of every player, every second. Im doing this as part of an art project (read: shes an artist), so I apologise for my complete lack of programming knowledge.
Heres what I have so far (by foraging and guessing)...
This code works fine and tells me the location the player spawns and which overall spawn it is. This however is only part of what I want.
I found this code earlier on the forums...
Which is good, but the location needs to be logged every second, using I assume a timer function like this one?
My question is this, how can all these elements be combined to make a lovely fat log file of locations?
My problem at the moment I think lies with the timer, I simply cant get it to work with or in another function. Indeed judging by what ucc make keeps telling me functions cant go inside other functions. Im also trying to keep this as a mutator should I?
Any help with any of this would be appreciated, I have of course been trying to figure this out by myself and by using the wiki and many other "beginner to unrealscript" type sites, but well... I think my head has reached its code limit.
thanks
Im am trying to Log the location of every player, every second. Im doing this as part of an art project (read: shes an artist), so I apologise for my complete lack of programming knowledge.
Heres what I have so far (by foraging and guessing)...
Code:
class playerlocation extends mutator;
var() int counter;
event PreBeginPlay()
{
counter=0;
}
function ModifyPlayer(Pawn Other)
{
counter=counter+1;
Log( "spawn = " $ counter);
Log(Other.Location.X);
Log(Other.Location.Y);
Log(Other.Location.Z);
Super.ModifyPlayer(Other);
}
defaultproperties
{
FriendlyName="Spawn Points"
Description="please tell me whither I spawn"
}
This code works fine and tells me the location the player spawns and which overall spawn it is. This however is only part of what I want.
I found this code earlier on the forums...
Code:
class myDeathmatch extends xDeathmatch;
defaultproperties
{
defaultplayercontrollerclass=class'mypackage.myPlayerController'
}
Code:
class myPlayerController extends xPlayer;
exec function GetLocation()
{
log("My location is: "$Location);
}
defaultproperties
{
}
Which is good, but the location needs to be logged every second, using I assume a timer function like this one?
Code:
event PreBeginPlay()
{
SetTimer(1.0,true);
}
function Timer()
{
}
My question is this, how can all these elements be combined to make a lovely fat log file of locations?
My problem at the moment I think lies with the timer, I simply cant get it to work with or in another function. Indeed judging by what ucc make keeps telling me functions cant go inside other functions. Im also trying to keep this as a mutator should I?
Any help with any of this would be appreciated, I have of course been trying to figure this out by myself and by using the wiki and many other "beginner to unrealscript" type sites, but well... I think my head has reached its code limit.
thanks