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
Script Help making your character collapse?
PixelHurricane Offline
Junior Member

Posts: 24
Threads: 8
Joined: Jul 2012
Reputation: 0
#1
Wink  making your character collapse?

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.
05-25-2013, 03:35 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: making your character collapse?

The Wiki Wrote:void FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);

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
That one should allow the player to roll over onto their side. Have an example:
PHP Code: (Select All)
void FadePlayerRollTo(30.0f1.0f3.0f); 
This will roll the player onto their side at 30 x value.
Will move the player down there fairly slowly.
And the maximum speed of the fall is 3 Smile

Just put it into a CollideCallback event with a ScriptArea.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 05-25-2013, 03:58 AM by Romulator.)
05-25-2013, 03:58 AM
Find
PixelHurricane Offline
Junior Member

Posts: 24
Threads: 8
Joined: Jul 2012
Reputation: 0
#3
RE: making your character collapse?

(05-25-2013, 03:58 AM)ROMul8r Wrote:
The Wiki Wrote:void FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);

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
That one should allow the player to roll over onto their side. Have an example:
PHP Code: (Select All)
void FadePlayerRollTo(30.0f1.0f3.0f); 
This will roll the player onto their side at 30 x value.
Will move the player down there fairly slowly.
And the maximum speed of the fall is 3 Smile

Just put it into a CollideCallback event with a ScriptArea.

alright, i'll throw that in the script and see if i get what i'm looking for
05-25-2013, 04:11 AM
Find
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#4
RE: making your character collapse?

Or just bring the player's sanity down using:

PHP Code: (Select All)
void SetPlayerSanity(float afSanity); 

But you might want to save the player's sanity beforehand, that way you can restore it later.

Something like this..

PHP Code: (Select All)
void callbackfunction(parameters etc)
{
  
SetLocalVarFloat("sanityfloat"GetPlayerSanity());
  
//Assigns the player's sanity to a variable

  //Do other things


Later on..

PHP Code: (Select All)
void function(parameters)
{
SetPlayerSanity(GetLocalVarFloat("aforementioned float"));

(This post was last modified: 05-25-2013, 04:27 AM by Tomato Cat.)
05-25-2013, 04:19 AM
Find




Users browsing this thread: 1 Guest(s)