Here's the vanilla script in its entirety:
scriptName dunPostHelgenEnableScript extends ObjectReferencefloat property myDaysPassed autoGlobalVariable property gGameDaysPassed autoLocation property myLocation autoObjectReference property myBridgeDebris autoObjectReference property myBridge autoObjectReference myLink;****************************Event onLoad() myLink = getLinkedRef() as ObjectReference if (myDaysPassed <= gGameDaysPassed.getValue()) && (game.getPlayer().IsInLocation(myLocation) == false) myLink.enable() myBridge.disable() myBridgeDebris.disable() disable() endifendEvent;****************************
This script is attached to a marker located way up in the air in Whiterun, and it is linked to another marker way up in the air in the Helgen Exterior cell. The marker in Helgen has a number of other references attached to it that are enabled or disabled when the marker itself is enabled.
I understand almost everything in this script except for the “if (myDaysPassed <= gGameDaysPassed.getValue()) && (game.getPlayer().IsInLocation(myLocation) == false)” part.
I'm wondering about the getValue() and the IsInLocarion(myLocation)==false bits.
If I changed getValue() to getValue(4) would that make it so that 4 game days would have to pass before the objects you linked to would enable or disable? This is what I need to control – the number of days after a quest stage is set (or perhaps other events) before various objects get enabled. (This stuff clearly takes a couple of days to enable in game, but I don't see here where anything tells it how long to wait to enable the stuff.)
I'm also wondering why they set it to enable only when the player was NOT in the same location as the marker? The marker is in Whiterun, but the stuff it enables is in and around Helgen. So in order for the marker to load, the player HAS to enter Whiterun, but isin't the code saying the player cannot be in Whiterun by the ==false part? (Or am I not understanding that bit correctly?)
Or by using myLink = getLinkedRef() as ObjectReference it's checking that that player is NOT in the cell where the LINKED reference is (Helgen, NOT the marker itself in Whiterun), so that the stuff will enable while the player is not near Helgen?
Also, I don't know if this will help or not, but with the GECK I used the following script attached to a quest that was not set to run when the game started. I could then trigger my quest to start by various dialog, other quest stages or whatever, and it worked flawlessly. I'm needing to do the same thing with Papyrus/Skyrim.
scn BalokTimerQuestSCRIPTshort DoOncefloat MyTimerBegin GameMode If DoOnce == 0 Set DoOnce to 1 Set MyTimer to GameDaysPassed EndIf If GameDaysPassed >= (MyTimer + 1) && DoOnce == 1 Set DoOnce to 2 ;do all my cool stuff here stopquest BalokTimerQuest EndIfEnd
Thanks!

