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
Player float script problem
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#1
Player float script problem

Hi, I'm having some issues on making a player float/fly upwards in my custom map. Nothing happens. I receive a message from the "SetMessage" so there shouldn't be anything wrong with the callback. These are the scripts:

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_Area4Levitate", "CollideScriptArea_Area4Levitate", false, 1);
}


void CollideScriptArea_Area4Levitate(string &in asParent, string &in asChild, int alState)
{
AddTimer("FloatTime1", 0.08, "FloatPlayer1");
AddTimer("FloatTime2", 0.16, "FloatPlayer2");
AddTimer("FloatTime3", 0.24, "FloatPlayer3");
}

void FloatPlayer1(string &in asTimer)
{
AddPropImpulse("Player", 0, 2000.0f, 0, "");
}

void FloatPlayer2(string &in asTimer)
{
AddPlayerBodyForce(0, 4000.0, 0, false);
AddPropImpulse("Player", 0, 2500.0f, 0, "");
}

void FloatPlayer3(string &in asTimer)
{
SetMessage("Area4", "Test", 4);
AddPlayerBodyForce(0, 2000, 0, false);
AddPropImpulse("Player", 0, 2000.0f, 0, "");
}

[Image: mZiYnxe.png]


02-05-2011, 08:29 PM
Find


Messages In This Thread
Player float script problem - by Acies - 02-05-2011, 08:29 PM
RE: Player float script problem - by Pandemoneus - 02-05-2011, 08:33 PM
RE: Player float script problem - by Acies - 02-05-2011, 08:50 PM



Users browsing this thread: 1 Guest(s)