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) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem With "AddPlayerBodyForce" Func
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#1
Question  Problem With "AddPlayerBodyForce" Func

I made this awesome script and everything works except the player does not change position... Sad

The "AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords);" doesn't work. Huh
Any tips or answers?

If you wanted to see the whole script... here you go.

//////////////////////START: ALTARLAMP ROOM

void AltarLampFunc(string &in asParent , string &in asChild , int alState)
{
    StopMusic(0.2f , 10);
    GiveSanityDamage(15 , true);
    SetSwingDoorLocked("cellar_wood01_2" , true , true);
    SetLampLit("altar_lamp_1" , true , true);
    AddTimer("MusicEvent" , 4.0f , "MusicEventFunc");
    AddTimer("PlayerMoveTimer" , 5.0f , "PlayerMoveTimerFunc");
}
void MusicEventFunc(string &in asTimer)
{
    PlayMusic("19_event_brute.ogg" , false , 1.0f , 0.1f , 10.0f , false);
}
void PlayerMoveTimerFunc(string &in asTimer)
{
    AddPlayerBodyForce(0.0 , 2.0 , 0.0 , true);
    AddTimer("PlayerMoveTimer2" , 1.0f , "PlayerMoveTimerFunc2");
}
void PlayerMoveTimerFunc2(string &in asTimer)
{
    AddPlayerBodyForce(2.0 , 0.0 , 0.0 , true);
    AddTimer("PlayerMoveTimer3" , 1.0f , "PlayerMoveTimerFunc3");
}
void PlayerMoveTimerFunc3(string &in asTimer)
{
    AddPlayerBodyForce(-4.0 , 0.0 , 0.0 , true);
    AddTimer("PlayerMoveTimer4" , 1.0f , "PlayerMoveTimerFunc4");
}
void PlayerMoveTimerFunc4(string &in asTimer)
{
    StopMusic(1.0f , 2.0f);
    AddPlayerBodyForce(2.0 , 0.0 , 0.0 , true);
    SetSwingDoorLocked("cellar_wood01_2" , false , true);
    AddTimer("AltarLampOff" , 1.0f , "AltarLampOffFunc");
}
void AltarLampOffFunc(string &in asTimer)
{
    SetLampLit("altar_lamp_1" , false , true);
}

//////////////////////END: ALTARLAMP ROOM

Edit: By the way, the room I put it in keeps on dissapearing... like, wtf?

10-23-2010, 11:58 PM
Find


Messages In This Thread
Problem With "AddPlayerBodyForce" Func - by Kyle - 10-23-2010, 11:58 PM



Users browsing this thread: 1 Guest(s)