Gameday. gamehour + location script combined?

Post » Tue Apr 15, 2014 4:01 am

Hi all. Having a headache over this one.

NPC is a wanderer, he gets around but on Mondays at 4.00am he sets off into the town market. It's quite a distance, arrives around 7.00am. The quest tied to him asks player to find this NPC with the objective "Check the market for NPCx". So far I've scripted that today IS a Monday between 0.00am and 7.00am and a note is enabled on top of a market stall informing player that NPCx only attends the market on Mondays, player didn't know this prior to the note being read/enabled. As I said if today is, and it is, Monday and the above timeframe is relevant then the objective says "NPCx is due here today. Come back later." This works as it should. Script so far...

Quest Property myQuest AutoInt Property PreReqStage AutoInt Property StageToSet AutoGlobalVariable Property GameHour AutoInt Function GetDayOfWeek()	Int GameDaysPassed 	GameDaysPassed = GetPassedGameDays()	return GameDaysPassed % 7EndFunctionInt Function GetPassedGameDays()	Float GameTime	Int GameDaysPassed 	GameTime = Utility.GetCurrentGameTime()	GameDaysPassed = GameTime As Int	Return GameDaysPassedEndFunctionEvent OnTriggerEnter(objectreference akactionref)Float fTime = GameHour.GetValue()If MyQuest.GetStage() == PreReqStageIf((akactionref == game.getplayer()) && (GetDayOfWeek() == 1))If fTime > 0.0 && fTime < 6.0MyQuest.SetStage(StageToSet)	EndIfEndifEndifEndEvent

I'm not good at combining conditions in scripts, what I need is to add to the script that if today is not Monday (timeframe I'm guessing is irrelevant here), do I use <> or =!, then do nothing. Nothing i.e. not enabling NPCx's goods for sale - this is taken care of by a similar script.

Thanks for your time.

User avatar
OJY
 
Posts: 3462
Joined: Wed May 30, 2007 3:11 pm

Post » Tue Apr 15, 2014 5:55 am

Take a look http://www.creationkit.com/Operator_Reference#Comparison_Operators. "!=" is the correct operator to test if two values are not equal.

-docblacky

User avatar
Rachyroo
 
Posts: 3415
Joined: Tue Jun 20, 2006 11:23 pm


Return to V - Skyrim