Calling Timer() problem

This class is for custom teleporters that handle what goes on in jail. The other stuff outside of this class all works fine, and everything here does too, except the stuff in Timer(), oddly. None of it gets called.
Not sure why it's not working. I suspect it's a problem with "SetTimer(float(timein), false)" though. Tried it with the variable still as an int but I get the same result. Am I just doing something silly like converting it to float wrong?
- Code: Select all
//=================================
// PoliceJailCell
//=================================
Class PoliceJailCell extends Teleporter;
Var PoliceCrimeMon PCMM;
Var Human Prisoner;
Var ReleasePlace RPLL;
function BeginPlay()
{
local PoliceCrimeMon PCM;
local ReleasePlace RPL;
foreach AllActors(class'PoliceCrimeMon',PCM)
{
PCMM = PCM;
}
foreach AllActors(Class'ReleasePlace',RPL)
{
RPLL = RPL;
}
}
simulated function bool Accept( actor Incoming, Actor Source )
{
local int i;
local int timein;
local int timein2;
local DeusExWeapon DEW;
foreach AllActors(class'DeusExWeapon',DEW)
{
if(DEW.Owner == Human(Incoming))
{
if(DEW.IsA('CozCreditCard'))
{
//Cozmo: Don't destroy this. I think it's "if(!(stuff))" to do it properly but idk.
}
else
{
DEW.Destroy();
}
}
}
Super.Accept(Incoming, Source);
if(Incoming.IsA('Human'))
{
for (i=1; i<20; i++)
{
if(Human(Incoming) == PCMM.Criminal[i])
{
timein = PCMM.CriminalLevel[i]*25;
timein2 = timein / 60;
Human(Incoming).Alliance = 'Player';
Human(Incoming).ClientMessage("|p2When you were captured, you had a criminal level of "$PCMM.CriminalLevel[i]);
Human(Incoming).ClientMessage("|p2This means your sentance is "$timein$" seconds long. ("$timein2$" minutes long.)");
Prisoner = Human(Incoming);
Prisoner.HealPlayer(50, true);
PCMM.CriminalLevel[i] = 0;
PCMM.Criminal[i] = None;
SetTimer(float(timein), false);
}
}
}
}
function Timer()
{
Prisoner.SetLocation(RPLL.Location);
Prisoner.ClientMessage("|P2We will be keeping any weapons you had when you were arrested.");
Prisoner.ClientMessage("|P2You have been released from jail. For now.");
Prisoner = None;
}
defaultproperties
{
}
Not sure why it's not working. I suspect it's a problem with "SetTimer(float(timein), false)" though. Tried it with the variable still as an int but I get the same result. Am I just doing something silly like converting it to float wrong?