Proximity & 24-Hour Timer Script Help?

Post » Sun May 05, 2013 2:27 am

So, I'm working on a quest mod, and I've got everything working except for two things: First, I need to make it so that, when the quest is at a certain stage, approaching the Onyx Caverns dungeon will trigger an update. Second, once the quest reaches another stage, it should commence a timer so that three NPCs will be enabled and one disabled after a day has passed in-game. I've looked at the scripts for quests with similar situations, but neither part seems to fire no matter what I try. Here's what I have:

Spoiler
User avatar
Heather Kush
 
Posts: 3456
Joined: Tue Jun 05, 2007 10:05 pm

Post » Sun May 05, 2013 4:48 pm

The first part where you advance the quest based on approaching the marker is fine.

The second part has several problems. The number one thing you need to remember is that quest scripts fire continuously. The default is every 5 seconds. So you are continually resetting the currentDay variable.

if ( getStage socQuestJesan 60 ) && ( --- What's this? I'm not sure how this would even compile. Also it should be getStage socQuestJesan == 60.
set currentDay to gameDaysPassed
set currentTime to gameHour
--- You need a doOnce variable or a new quest stage so this section doesn't keep firing.
endif

--- this part should be fine once you fix the above, except it should be getStage socQuestJesan == 60.
if ( getStage socQuestJesan 60 ) && ( gameDaysPassed >= currentDay + 1 )
if gameHour >= currentTime
socWarielRef.disable
socCaptainRef.enable
socCorruptSoldierARef.enable
socCorruptSoldierBRef.enable
setstage socQuestJesan 65
endif
endif


See my comments in yellow. Hopefully that will get you fixed up.

The damned code tags are messing up the formatting. >.<
User avatar
Love iz not
 
Posts: 3377
Joined: Sat Aug 25, 2007 8:55 pm

Post » Sun May 05, 2013 9:29 am

Thanks! That first bit wit the "&& (" isn't actually in the code, I don't know how the hell that got there. Appreciate the help!
User avatar
Ridhwan Hemsome
 
Posts: 3501
Joined: Sun May 06, 2007 2:13 pm


Return to IV - Oblivion