Jump to content

Timers


Sillara of the Tamari

Recommended Posts

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 :rolleyes:

Link to comment

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

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

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

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
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
Guest Guest_Vlad
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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...