Sillara of the Tamari Posted November 24, 2004 Share Posted November 24, 2004 I am having great trouble with my in-game timers. I do all right with the RealSetGlobal timers, but whenever I want to do an in-game timer, nothing happens. This is my code: IF Global("YasraenaArrested","GLOBAL",1) Global("YSTMCPTNGoesFiveFlagons","LOCALS",0) THEN RESPONSE #100 EscapeAreaMove("AR0511",720,567,4) SetGlobal("YSTMCPTNGoesFiveFlagons","LOCALS",1) SetGlobalTimer("YasraenaCountdown","GLOBAL",THREE_DAYS) END IF GlobalTimerExpired("YasraenaCountdown","GLOBAL") !GlobalGT("YasraenaRescued","GLOBAL",0) THEN RESPONSE #100 DestroySelf() END When I wear down the timer to see what happens (whether by travel or rest), NOTHING happens! I have another script which checks for the same timer to expire, but again, NOTHING happens! I have checked IESDP (love it!) and the game's code. Phaere uses exactly this code to set her timer, but I cannot get it to work. Is there something I have overlooked? Sillara, the resident forum pest Link to comment
Meira Posted November 24, 2004 Share Posted November 24, 2004 I believe that SetGlobalTimer was used for Keto's quest and it turned out to be broken and thus changed. So it might well be that you are not doing anything wrong. Link to comment
Domi Posted November 24, 2004 Share Posted November 24, 2004 Are you sure? Are there anywhere more details on it? Link to comment
hlidskialf Posted November 24, 2004 Share Posted November 24, 2004 I've never had any troubles with SetGlobalTimer. Hell, it's used an immense amount of times in the default game! Are you certain the timer is firing and expiring? ie) Check the value in the savegame instead of just hitting rest a few times? Link to comment
Meira Posted November 24, 2004 Share Posted November 24, 2004 I probably get flayed for spilling the very secret beta information, but up until Keto beta16 SetGlobalTimer("PGKetoQuestTimer","GLOBAL",THIRTY_DAYS) was used and then abandoned "as apparently very broken". *hides* Link to comment
Domi Posted November 24, 2004 Share Posted November 24, 2004 Can it be the THREE_DAYS part? Would it work if you put second's count in it? Link to comment
CamDawg Posted November 24, 2004 Share Posted November 24, 2004 A couple of thoughts... I'm with Hlid and have never seen or had problems with global timers. First question is can you confirm that the timer is being set? If it's not being set then CLUA'ing to 1 would possibly cause it to not count as an expired timer (this is conjecture). Another potential issue is the AR0511 itself, the Five Flagons. It doesn't not have an area script by default, which may be an issue if any of this is scripted via AR0511.bcs, and it also gets replaced by another area if the player obtains the bard stronghold. Link to comment
Smoketest Posted November 24, 2004 Share Posted November 24, 2004 Since there's a variable with a LOCALS scope in the script, it appears this script is attached to Yasraena's CRE file, not an ARE. One thing I notice Bioware does, everywhere but in cutscenes, is place inter-area movement commands (like EscapeAreaMove) at the end of the action list, to ensure all the other actions take place before the creature leaves the current area. Try that and see if your timer gets set. I suspect it will work. Link to comment
neriana Posted November 24, 2004 Share Posted November 24, 2004 The only difference I can see there between your script and one I'm using myself, which I basically copied from Kelsey, is the order of SetGlobalTimer and SetGlobal. They're reversed. Of course, I don't know if mine works yet, but Kelsey's does. The only suggestion I have (and it's not much of one) is to change "YSTMCPTNGoesFiveFlagons" to a GLOBAL. I've heard some bad things about the Five Flagons area, too. Link to comment
Smoketest Posted November 24, 2004 Share Posted November 24, 2004 Can it be the THREE_DAYS part? Would it work if you put second's count in it? By default, SetGlobalTimer is defined to use values from GTIMES.IDS, and THREE_DAYS is defined in that file, so it should work. The only time I've had trouble with this is if I place too many new definitions in GTIMES.IDS. Bioware uses a thirty day timer for Aerie's baby, but they specify 216000 (in BAERIE25.DLG) instead of THIRTY_DAYS. So it's not the timer that's broken. Link to comment
Sillara of the Tamari Posted November 24, 2004 Author Share Posted November 24, 2004 Thank you! I will try moving the movement command to the last thing, and I will alter the LOCALS to a Global. I will let you know how it goes! (And, no, I am not using the area .bcs for the Five Flagons. That is not a good thing to do.) Sillara Link to comment
Guest Guest_Vlad Posted November 24, 2004 Share Posted November 24, 2004 IF Global("YasraenaArrested","GLOBAL",1) Global("YSTMCPTNGoesFiveFlagons","LOCALS",0) THEN RESPONSE #100 EscapeAreaMove("AR0511",720,567,4) SetGlobal("YSTMCPTNGoesFiveFlagons","LOCALS",1) SetGlobalTimer("YasraenaCountdown","GLOBAL",THREE_DAYS) END The right script will be: IF Global("YasraenaArrested","GLOBAL",1) Global("YSTMCPTNGoesFiveFlagons","LOCALS",0) THEN RESPONSE #100 SetGlobal("YSTMCPTNGoesFiveFlagons","LOCALS",1) SetGlobalTimer("YasraenaCountdown","GLOBAL",THREE_DAYS) EscapeAreaMove("AR0511",720,567,4) END And I would use MoveGlobals instead of EscapeAreaMove, otherwise LOCALS may not work. EscapeArea or EscapeAreaMove means totally destroy your .CRE object and re-create its copy if the lattest is choosen. And if you destroy your .CRE you may forget about LOCALS. Link to comment
Sillara of the Tamari Posted November 25, 2004 Author Share Posted November 25, 2004 Ah, thank you! That is very helpful! (And off to code that in!) Sillara Link to comment
jcompton Posted November 25, 2004 Share Posted November 25, 2004 Yeah, sorry, Meira, I wasn't trying to communicate that I felt non-Real timers were broken generally, but clearly the "THIRTY_DAYS" setting had nothing at all to do with thirty in-game days, so I changed it out rather than beating my head against what it was REALLY going to be. Link to comment
Meira Posted November 25, 2004 Share Posted November 25, 2004 I’m glad to get this sorted out. I have never given timers values other than strictly numerical, but it’s good to know that should the need arise THREE_DAYS etc. should also do the trick. Or at least do something. - Meira, little less confused than before Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.