03-23-2011, 12:41 AM
Hey all, I'm trying to make an area collide function which only activates if a treasure chest is open. I've tried a few things, but I'm still pretty new to scripting. Thanks for any advice you may have!
if (GetSwingDoorClosed(string &asName) == false) //door NOT closed
{
...do something...
}
/**
* -1 = angle is close to 0, 1=angle is 70% or higher of max, 0=inbetween -1 and 1.
*/
if (GetSwingDoorState(string &asName) != -1)
{
...do something...
}
(03-25-2011, 05:23 PM)Pandemoneus Wrote: [ -> ]For doors you should just use
Code:if (GetSwingDoorClosed(string &asName) == false) //door NOT closed
{
...do something...
}
[edit]
Or if you don't want anything to happen when the door is almost closed:
Code:/**
* -1 = angle is close to 0, 1=angle is 70% or higher of max, 0=inbetween -1 and 1.
*/
if (GetSwingDoorState(string &asName) != -1)
{
...do something...
}