RE: Curious Hio, Scripting questions. (Current: Checkpoints.)
It seems to me that there are a few problems in the script.
When you put a // before a function, it treats it as a comment on the script and won't do anything.
Also, just so you know, you don't need the two "{"s and "}"s for functions, only one, Like:
void Collide_Callback(string &in asParent, string &in asChild, int alState)
{
//Functions here
}
If removing the //s before some of the functions doesn't help, then I don't know, sorry. As for having the door wide open, however, The thing that comes to mind for me is to force the door open, like this:
SetSwingDoorClosed("mansion_1", false, false);
SetSwingDoorDisableAutoClose("mansion_1", true);
AddPropImpulse("mansion_1", X, Y, Z, "world");
Replace X,Y,and Z with the coordinates that the force comes from. Check the coordinates of the door in the editor and play around with it a bit to get it right.
To close the door, just use:
SetSwingDoorClosed("mansion_1", true, false);
SetSwingDoorDisableAutoClose("mansion_1", false);
Hope it helps.
|