Frictional Games Forum (read-only)

Full Version: Help With Scripting Sanity Damage With Door!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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"
Thank you very much! It works like a charm! Yay! Smile
(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