02-18-2013, 02:43 PM
(02-18-2013, 02:17 PM)Adrianis Wrote: [ -> ]For 3, you'll want to use AddPropForce to push the door, but have the function repeat using a timer, and have the force switch sides so it is pushing the door closed, then open, closed again etc. You could just look in the wine cellar scripts to see how FG did it, of course.Kinda like that. But i want it to play once, like this;
Perhaps something like this...
void OnEnter()
{
SetSwingDoorDisableAutoClose("doorname", true); // to make sure the door does not close
AddTimer("DoorBangOpen", 2, "DoorBang");
}
void DoorBang(string &in strTimer)
{
if (strTimer == "DoorBangOpen") {
AddPropForce("doorname", 0, 0, 500, "local"); // you'll need to play around with the force value / direction
AddTimer("DoorBangClose", 1, "DoorBang");
}
else if (strTimer == "DoorBangClose") {
AddPropForce("doorname", 0, 0, -1000, "local"); // you'll need to play around with the force value / direction, note reversal of direction from above
AddTimer("DoorBangOpen", 2, "DoorBang");
}
}
For point 2, you want the piano to be playing, but to stop playing when the player looks at it. Then you want the piano to start playing again when the player looks away? and stop again when they look back? etc etc...
When i was not looking, the piano plays.
When i was looking at it, it suddenly stops (like JJJRRRREEENNNG!), and there's a dust figure. Just once.
Also, in number #3, the force value / direction is what? the "500" thing?