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?
Clear Offline
Junior Member

Posts: 19
Threads: 4
Joined: May 2012
Reputation: 0
#5
RE: How do i make the Sanity script?

(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?
05-25-2012, 02:34 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)