Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(fixed) RemoveTimer Problem! please help :(
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#4
RE: RemoveTimer Problem! please help :(

I would suggest trying the following:

in case 14, before starting the timer, we will need to allow the push loop to work
case 14:
FadeIn(4);
TeleportPlayer("PlayerStartArea_3");

SetLocalVarInt("AllowPlayerPushMove",1); //Say we are allowing the player to be pushed

AddTimer("PushPlayerStart1", 0.01, "PushPlayer1"); //Timer as normal here


StartPlayerLookAt("halllook", 2.0f, 2.0f, "");
break;

In case69, where you are using remove timer we will need to tell the pushing to stop:
case 69:
FadeIn(4);
TeleportPlayer("PlayerStartArea_4");
SetPlayerActive(true);
SetInventoryDisabled(false);
SetPlayerCrouchDisabled(false);
SetPlayerJumpDisabled(false);
ShowPlayerCrossHairIcons(true);
StopPlayerLookAt();
StopMusic(3.0f , 0.0f);

//Say we are no longer allowing the push timer
//instead of Removing the timer
SetLocalVarInt("AllowPlayerPushMove",0);

break;

And the timer method:
void PushPlayer1(string &in asTimer)
{
AddPlayerBodyForce(0, 0.0f, 435.1f, true);

//Only renew the push loop whilst we are allowing the player to be pushed.
if(GetLocalVarInt("AllowPlayerPushMove")==1)
  AddTimer("PushPlayerLoop1", 0.012, "PushPlayer1");

}
08-10-2012, 05:24 PM
Find


Messages In This Thread
RE: RemoveTimer Problem! please help :( - by Apjjm - 08-10-2012, 05:24 PM



Users browsing this thread: 1 Guest(s)