void main()
{
object oDoor1 = GetObjectByTag("DOOR_TAG_HERE");
if (GetIsDusk() || GetIsNight())
{
AssignCommand(oDoor1, SetLocked(oDoor1, TRUE));
}
}
The above script works when using the TAG of the particular door. Not sure what all that other stuff is with those FALSE and TRUE. Perhaps it does the same thing, but I've always liked spelling things out in a script to fully understand it since I'm not a script master myself.
Perhaps that will get you going in the direction.
Additionally, I'd rather just put everything in the ModuleHeartBeat script, and close everything at the required time all at once, rather than firing scripts for every individual door.
Another option, if you don't want to go that route, is to lock all doors OnEnter of the specified area and avoid the heartbeat altogether. Then doors only lock/open when the area is entered.
FP!
Modifié par Fester Pot, 16 octobre 2013 - 09:07 .