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
Help With Scripting Sanity Damage With Door!
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#1
Help With Scripting Sanity Damage With Door!

I need help with trying to make it when the door closes, you get sanity damage. I need for this to get combined for it to work nicely. Smile

GiveSanityDamage(float afAmount, bool abUseEffect);


void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "CollideRoomTwo" , true, 1);
}

void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("cellar_wood01_1", true, true);
}

void OnEnter()
{

}

void OnLeave()
{

}
Anyone please?

(This post was last modified: 10-08-2010, 12:11 AM by Kyle.)
10-07-2010, 11:42 PM
Find
Chilton Offline
Member

Posts: 138
Threads: 9
Joined: Sep 2010
Reputation: 0
#2
RE: Help With Scripting Sanity Damage With Door!

void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "CollideRoomTwo" , true, 1);
}

void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("cellar_wood01_1", true, true);
GiveSanityDamage(25, 1);
}

void OnEnter()
{

}

void OnLeave()
{

}

Note were i put the "1" in the sanity effect - If that doesnt work, replace it with "True"
10-08-2010, 03:21 AM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#3
RE: Help With Scripting Sanity Damage With Door!

Thank you very much! It works like a charm! Yay! Smile

10-08-2010, 11:35 AM
Find
Chilton Offline
Member

Posts: 138
Threads: 9
Joined: Sep 2010
Reputation: 0
#4
RE: Help With Scripting Sanity Damage With Door!

(10-08-2010, 11:35 AM)Kyle Wrote: Thank you very much! It works like a charm! Yay! Smile

Any time - Glad i could be of assistance Smile
10-08-2010, 01:16 PM
Find




Users browsing this thread: 2 Guest(s)