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:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] Need help!
DanielRand47 Away
Member

Posts: 109
Threads: 16
Joined: Mar 2012
Reputation: 3
#1
[split] Need help!

Hello. I'm currently working on the opening map for custom story/mod called "Mansion of Doom", and I have used the AddPlayerBodyForce function, and it does not work when the last parameter is set to true, which wherever the player faces, is where he is pushed. Here is my script, or the last quarter of it.



void PushPlayer(string &in asParent, string &in asChild, int alStat)
{
SetPlayerActive(false);
StartPlayerLookAt("AreaLookAt", 3.0f, 3.0f, "");
AddTimer("Timer_22", 1.5f, "stoplook");
}

void stoplook(string &in asTimer)
{
StopPlayerLookAt();
AddTimer("Timer_23", 0.5f, "LookAtArea");
}

void LookAtArea(string &in asTimer)
{
StartPlayerLookAt("AreaLookAt_1", 3.0f, 3.0f, "");
AddTimer("Timer_24", 1.5f, "stoplook2");
}

void stoplook2(string &in asTimer)
{
StopPlayerLookAt();
AddTimer("Timer_25", 0.5f, "LookAtArea2");
}

void LookAtArea2(string &in asTimer)
{
StartPlayerLookAt("AreaLookAt_2", 3.0f, 3.0f, "");
AddTimer("Timer_26", 1.5f, "stoplook3");
}

void stoplook3(string &in asTimer)
{
StopPlayerLookAt();
AddTimer("Timer_27", 1.5f, "LookAtArea3");
}

void LookAtArea3(string &in asTimer)
{
StartPlayerLookAt("AreaLookAt_3", 3.0f, 3.0f, "");
AddTimer("Timer_28", 1.5f, "stoplook4");
}

void stoplook4(string &in asTimer)
{
StopPlayerLookAt();
AddTimer("Timer_29", 0.5f, "LookAtArea4");
}

void LookAtArea4(string &in asTimer)
{
StartPlayerLookAt("AreaLookAt_4", 12.0f, 12.0f, "");
AddTimer("Timer_30", 0.5f, "stoplook5");
}

void stoplook5(string &in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);
AddTimer("Timer_31", 1.0f, "beginpush");
}

void beginpush(string &in asTimer)
{
AddPlayerBodyForce(50000, 0, 0, true);
}

The area in which it happens, is an open area, and it works when the bool is set to false, which is the world coordinates. If any one knows how to fix this, please let me know. I have tried different values.

Thanks abunch!!
12-03-2012, 05:53 AM
Find


Messages In This Thread
[split] Need help! - by DanielRand47 - 12-03-2012, 05:53 AM
RE: [split] Need help! - by The chaser - 12-03-2012, 09:19 AM
RE: [split] Need help! - by FlawlessHappiness - 12-03-2012, 09:55 AM
RE: [split] Need help! - by TheGreatCthulhu - 12-03-2012, 11:40 AM



Users browsing this thread: 2 Guest(s)