ProjectEW Posted February 6, 2011 Share Posted February 6, 2011 Hi, I'm making a mod that's kind of a settlement type of thing, and one feature is a security terminal, with which you can turn on and off auto-locking the gate to the settlement at night. What I'm currently doing doesn't work: scn earlywSecurityControlSCRIPT BEGIN GameMode if earlywNightLock if GameHour > 22 || GameHour < 6 if mainEntrance.GetLocked == 0 mainEntrance.lock 50 endif else if mainEntrance.GetLocked || mainEntrance.GetLocked == 2 if earlywInLockdown == 0 mainEntrance.unlock endif endif endif endif END I've used printc to check the time and earlywNightLock to make sure they are correct, and they are. Is there some error or another way? I'm simply trying to lock it at night and unlock it in the morning, much like the shops in Megaton do in Fallout 3, but I don't have Fallout 3 installed currently, so I'm turning to you guys to help out a noob modder. Thanks! Link to comment Share on other sites More sharing options...
mjskull Posted February 7, 2011 Share Posted February 7, 2011 Can you explain a couple of points what is "earlywNightLock" you havent defined this reference anywhere? also your "if mainEntrance.GetLocked || mainEntrance.GetLocked == 2" im not sure will work can you have an OR statement with 1 check, shouldnt it be "if mainEntrance.GetLocked == 1 || mainEntrance.GetLocked == 2"...? Link to comment Share on other sites More sharing options...
ProjectEW Posted February 7, 2011 Author Share Posted February 7, 2011 earlyw is simply the prefix I use before everything in my mod, in order to make it compatible with other mods. It is a global value, which 1 means to lock during the night, and 0 means to leave the user to manually lock the gate at night. I use this code on a terminal to toggle this value: Set earlywNightLock to 1 I use another button in the terminal to run the opposite code: Set earlywNightLock to 0 I've checked to make sure of this, and it equals what it should. I shall try your suggestion on the if mainEntrance.GetLocked == 1 ||...Thanks for your reply! Link to comment Share on other sites More sharing options...
Recommended Posts