05-25-2013, 03:35 AM
we all know that if you look at a monster for to long it causes your character to fall over. i need a way to have that happen, but with no monster at all. it's even in a semi-bright room.
The Wiki Wrote:void FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);That one should allow the player to roll over onto their side. Have an example:
Rotates the position of the camera on the player's body.
afX - angle of rotation of head, positive being counter-clockwise
afSpeedMul - speed (possibly acceleration) multiplier of the rotation (default 1, which is really slow)
afMaxSpeed - maximum speed of rotation
void FadePlayerRollTo(30.0f, 1.0f, 3.0f);
(05-25-2013, 03:58 AM)ROMul8r Wrote: [ -> ]The Wiki Wrote:void FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);That one should allow the player to roll over onto their side. Have an example:
Rotates the position of the camera on the player's body.
afX - angle of rotation of head, positive being counter-clockwise
afSpeedMul - speed (possibly acceleration) multiplier of the rotation (default 1, which is really slow)
afMaxSpeed - maximum speed of rotation
This will roll the player onto their side at 30 x value.PHP Code:void FadePlayerRollTo(30.0f, 1.0f, 3.0f);
Will move the player down there fairly slowly.
And the maximum speed of the fall is 3
Just put it into a CollideCallback event with a ScriptArea.
void SetPlayerSanity(float afSanity);
void callbackfunction(parameters etc)
{
SetLocalVarFloat("sanityfloat", GetPlayerSanity());
//Assigns the player's sanity to a variable
//Do other things
}
void function(parameters)
{
SetPlayerSanity(GetLocalVarFloat("aforementioned float"));
}