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?
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


Messages In This Thread
RE: making your character collapse? - by Tomato Cat - 05-25-2013, 04:19 AM



Users browsing this thread: 2 Guest(s)