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
How do i make the Sanity script?
Putmalk Offline
Senior Member

Posts: 290
Threads: 13
Joined: Apr 2012
Reputation: 15
#6
RE: How do i make the Sanity script?

(05-25-2012, 02:34 PM)Clear Wrote:
(05-25-2012, 02:25 PM)Obliviator27 Wrote: You would have to set up a CollideCallback, which calls the function GiveSanityDamage. Like so

void OnStart()
{
AddEntityCollideCallback("Player", "RoomArea", "SanityDamage", true, 1);
}
void SanityDamage(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(10, true);
}
Thanks!
But i have a problem while putting the script down the HPS file, when i put it and load the game it gives me an error wich says function with the same parameters allready exicts... i have 2 void OnStart() in 1 HPS file, is that suppose to be like it?
One of it is for a key & door script, what do i need to do?
No. NEVER have two functions with the same name in it.

A basic script always looks like:

void OnStart()
{

}

void OnEnter()
{

}

void OnLeave()
{

}

05-25-2012, 02:44 PM
Find


Messages In This Thread
How do i make the Sanity script? - by Clear - 05-25-2012, 01:50 PM
RE: How do i make the Sanity script? - by Putmalk - 05-25-2012, 01:54 PM
RE: How do i make the Sanity script? - by Clear - 05-25-2012, 02:00 PM
RE: How do i make the Sanity script? - by Clear - 05-25-2012, 02:34 PM
RE: How do i make the Sanity script? - by Putmalk - 05-25-2012, 02:44 PM
RE: How do i make the Sanity script? - by Clear - 05-25-2012, 02:51 PM
RE: How do i make the Sanity script? - by Clear - 05-25-2012, 03:03 PM
RE: How do i make the Sanity script? - by Putmalk - 05-25-2012, 03:04 PM
RE: How do i make the Sanity script? - by Putmalk - 05-25-2012, 03:01 PM
RE: How do i make the Sanity script? - by Clear - 05-25-2012, 03:14 PM
RE: How do i make the Sanity script? - by Putmalk - 05-25-2012, 03:18 PM



Users browsing this thread: 1 Guest(s)