The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 :(
bjaffedj Offline
Junior Member

Posts: 39
Threads: 8
Joined: Aug 2012
Reputation: 0
#1
(fixed) RemoveTimer Problem! please help :(

okay i have a map script. in the script i have a function which makes the player being pushed (AddPlayerBodyForce). but each time i try to remove the timer of the function it does not seem to work. the player still gets pushed :/ i have tried many things and hopefully you can help Smile


The scripting:


void OnStart()
{
SetMapDisplayNameEntry("Intro");
//User properties
SetPlayerActive(false);
SetSanityDrainDisabled(true);
SetInventoryDisabled(true);
SetPlayerCrouchDisabled(true);
SetPlayerJumpDisabled(true);
ShowPlayerCrossHairIcons(false);
SetPlayerLampOil(0.0f);

//Sound properties
PlayMusic("music/intro_bg.ogg", true, 0.5, 2, 0, true);

//Timers
AddTimer("Intro", 8, "Intro");

//Finally start
//Finally Start
FadeOut(0);
FadeIn(4);
StartPlayerLookAt("prodlook", 2.0f, 2.0f, "");

AddTimer("Debug", 1, "Debug");

}

void Debug(string &in asTimer)
{
AddLocalVarInt("aq", 1);
AddDebugMessage(" "+ GetLocalVarInt("aq"), false);
AddTimer("Debug", 1, "Debug");
}

void Intro(string &in asTimer)
{
AddLocalVarInt("IntroInt", 1);

switch( GetLocalVarInt("IntroInt") )
{
case 1:
FadeOut(2);
break;
case 4:
FadeIn(4);
TeleportPlayer("PlayerStartArea_2");
StartPlayerLookAt("titellook", 2.0f, 2.0f, "");
break;
case 12:
FadeOut(3);
break;
case 14:
FadeIn(4);
TeleportPlayer("PlayerStartArea_3");
AddTimer("PushPlayerStart1", 0.01, "PushPlayer1");
StartPlayerLookAt("halllook", 2.0f, 2.0f, "");
break;
case 15:
SetMessage("Messages", "Popup1", 5);
break;
case 22:
SetMessage("Messages", "Popup2", 5);
break;
case 29:
SetMessage("Messages", "Popup3", 5);
break;
case 36:
SetMessage("Messages", "Popup4", 5);
break;
case 43:
SetMessage("Messages", "Popup5", 5);
break;
case 50:
SetMessage("Messages", "Popup6", 5);
break;
case 57:
SetMessage("Messages", "Popup7", 5);
break;
case 62:
FadeOut(3);
break;
case 64:
SetMessage("Messages", "Popup8", 5);
break;
case 69:
FadeIn(4);
TeleportPlayer("PlayerStartArea_4");
SetPlayerActive(true);
SetInventoryDisabled(false);
SetPlayerCrouchDisabled(false);
SetPlayerJumpDisabled(false);
ShowPlayerCrossHairIcons(true);
StopPlayerLookAt();
StopMusic(3.0f , 0.0f);
RemoveTimer("PushPlayerLoop1");
break;
}
if( GetLocalVarInt("IntroInt") < 126)
AddTimer("blackout", 1, "Intro");
}

void PushPlayer1(string &in asTimer)
{
AddPlayerBodyForce(0, 0.0f, 435.1f, true);
AddTimer("PushPlayerLoop1", 0.012, "PushPlayer1");
}
(This post was last modified: 08-10-2012, 09:54 PM by bjaffedj.)
08-10-2012, 10:49 AM
Find


Messages In This Thread
(fixed) RemoveTimer Problem! please help :( - by bjaffedj - 08-10-2012, 10:49 AM



Users browsing this thread: 1 Guest(s)