Gamedayspassed. What's wrong?
|
06-12-2011, 09:33 PM,
|
|||
|
|||
Gamedayspassed. What's wrong?
Hello. I'm having problem with my timer to work. The idea is to set a variable through dialogue "Entertained to 1" and once one day passes it is set to 0 again by quest script.
scriptname MVTawernaPodZmijaRozmowyQuestScript short Entertained float BardTimer Begin Gamemode if Entertained == 1 ; this is set in dialogue to 1 to mark that PCalready spoke ;with NPC set BardTimer to GameDaysPassed endif if GameDaysPassed > ( BardTimer + 1 ) set Entertained to 0 endif end So when Entertained is set to 1 ( by dialogue) you cannot talk about certain topic with NPC unless one day is up and Entertained is set to 0 again. But it doesn't work. Apparently the script doesn't change "Entetained" to 0 because after more than 1 day PC still cannot talk with NPC. Tell me please what am I doing wrong? |
|||
06-12-2011, 11:36 PM,
|
|||
|
|||
Hi Marek,
Ok, I've done a few timer scripts before (with GetSecondsPassed), so I'll take a stab at helping you: Try this instead - -------------------------------------- scn MVTawernaPodZmijaRozmowyQuestScript short Entertained float BardTimer Begin Gamemode if Entertained == 1 set BardTimer to 1 ;; the number is how many days is to pass endif if BardTimer > 0 set BardTimer to ( BardTimer - GetDaysPassed ) ;; can try GameDaysPassed instead, if GetDaysPassed does not work (wiki was down, so I couldn't look it up) elseif BardTimer <= 0 ;; the day has passed, so... set Entertained to 0 endif end ------------------------ Koniption
Yeah, don't let those little turds get you down. Dingleberries stick for a while, but eventually they fall off.
|
|||
06-13-2011, 06:48 AM,
|
|||
|
|||
Thanks for reply. Unfortunately this script doesn't work for me. Either the timer works and "Entertained" is not set to 0 OR simply timer just refuses to start counting. I thought that maybe I messed up something in my dialogue window but no.
There is one topic: "Tell a joke" When you press it and variable "Entertained == 0 , you tell a joke, get money, set "Entertained to 1 and BardTimer here should start counting so that you may not tell a joke until one day passes. If "Entertained == 1" NPC tells you to come back tomorrow. Well after telling one joke, he keeps saying "Come back tomorrow" and no matter how many days will pass he keeps saying that. |
|||
06-13-2011, 08:46 PM,
|
|||
|
|||
Quote:Originally posted by MarekVelgar Hmm. The CS wiki is still down, so I can't doublecheck about GetDaysPassed (or if it's proper term is GameDaysPassed..plus some other things) First try these tips, in order I post them, testing in game in-between each step.: 1) Make sure you are saving your script as a "Quest" script, and not an "Object" script. Simply adding "Quest Script" at the end of the scn script name is not good enough. If not work, proceed to #2 below... 1b) Make sure you add the proper indentation into my script, whereas mine lacked it when I posted it. 2)Make BardTimer a "short" , instead of a "float". If not work, proceed.... 3) Try turning "getDaysPassed" into "GameDaysPassed", in the script. Make sure BardTimer is a "float" again. 4) Same as #3 above, but make BardTimer a "short"again. 5) Something might be wrong with the Dialogue section of things. Can you post the scripting you put in the Dialogue window, that goes with this Quest script? Koniption
Yeah, don't let those little turds get you down. Dingleberries stick for a while, but eventually they fall off.
|
|||
06-14-2011, 10:16 AM,
|
|||
|
|||
My cousine came by to me and helped me with the script. Now it works properly.:
Scriptname Timer short Entertained short BardTimer short DoOnce Begin Gamemode if Entertained == 1 && DoOnce == 0 set DoOnce to 1 set BardTimer to GameDaysPassed + 1 ; endif if GameDaysPassed >= BardTimer set Entertained to 0 set DoOnce to 0 set BardTimer to 0 endif end |
|||
06-14-2011, 11:53 AM,
|
|||
|
|||
I am glad you solved the problem, I wanted to reply but was busy with other stuff.
Further the BardTimer is a short and not a float as mentioned in the OP.
Dum loquor, hora fugitĀ - While I speak the time flies
Ovid 43 BC - 17 AD |
|||
06-14-2011, 11:10 PM,
|
|||
|
|||
Hi Marek,
Great! I'm glad you got the problem solved. So is your cousin an Oblivion modder, too? Koniption
Yeah, don't let those little turds get you down. Dingleberries stick for a while, but eventually they fall off.
|
|||
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)