10-23-2010, 11:58 PM
I made this awesome script and everything works except the player does not change position...
The "AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords);" doesn't work.
Any tips or answers?
If you wanted to see the whole script... here you go.
Edit: By the way, the room I put it in keeps on dissapearing... like, wtf?
The "AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords);" doesn't work.
Any tips or answers?
If you wanted to see the whole script... here you go.
Code:
//////////////////////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?