Hi,
I am creating a game status report and have hit a snag.
I need to stop a function....
This is the function:
int walktimer;
function Walking()
{
if(player.Moving)
{
walktimer=0;
}
else if (walktimer > GetGameSpeed ())
{
Stopped_Moving += 1;
LNotMoving.Text = String.Format("%d", Stopped_Moving);
walktimer = 0;
}
else walktimer++;
}
In Rep exec always:
LDoors.Text = String.Format("%d", Doors);
Larrows.Text = String.Format("%d", Arrows);
LNotMoving.Text = String.Format("%d",Stopped_Moving);
LSecrets.Text = String.Format("%d",Secret_Area);
LRemain.Text = String.Format("%d",lapsed);
LTime_Taken.Text = String.Format("%d",lapsed);
LLostTime.Text = String.Format("%d",Stopped_Moving);
LMeanTime.Text = String.Format("%d",lapsed-Stopped_Moving);
Walking(); // This is the function I need to stop when viewing the status report... The gui is set to pause game.
Can you help..
cheers
EDIT Tut tut... added this:
if(gStatus.Visible==false)
Walking();
All now ok (nod)
Are you asking for
if (!gStatus.Visible) Walking();
?
Edit: Yeah. How long did you try and fix this yourself before opening a thread...? :P
Hi Khris,
about 2 minutes as I had only just began implementing it... It suddenly dawned on me what I needed to do...