devSin Posted February 25, 2007 Share Posted February 25, 2007 The game stores the expiry time in a variable. You could check it with Global() if you were so inclined. When you say SetGlobalTimer(), the game creates a normal variable and sets its value to the current game time plus the timer length. When you check GlobalTimerExpired(), the game checks to see if the current game time is greater than (or equal to?) the value stored in the variable. RealSetGlobalTimer() just changes the value of the variable (it would be the real time plus the timer length). Link to comment
EiriktheScald Posted February 25, 2007 Author Share Posted February 25, 2007 So, why doesn't RealGlobalTimerExpired work? Could it be that it's not being used correctly here? Link to comment
devSin Posted February 25, 2007 Share Posted February 25, 2007 So, why doesn't RealGlobalTimerExpired work? Could it be that it's not being used correctly here?You have a bug somewhere (or you didn't wait for a full minute real-time). The trigger itself should work fine. Link to comment
EiriktheScald Posted February 26, 2007 Author Share Posted February 26, 2007 You have a bug somewhere (or you didn't wait for a full minute real-time). The trigger itself should work fine. I didn't wait. Wow, a full minute seems like an eternity (what does eternity feel like?) in game time. Even 15 secs leaves a wide gap between imoen's dialog and eirik's. Does the timer keep running during dialog? Link to comment
berelinde Posted February 26, 2007 Share Posted February 26, 2007 Not if you have the "all dialogues pause game" component installed, and some pause it even if you don't. Link to comment
EiriktheScald Posted February 26, 2007 Author Share Posted February 26, 2007 This combination is working quite nicely (I also figured out how to pass the scroll). Thank you one and all. BAF: /* Tarnesh's spellbook */ IF Global("ESTarneshScroll","GLOBAL",0) CombatCounter(0) !See([ENEMY]) PartyHasItem("_SCRLTAR") InParty(Myself) !StateCheck(Myself,CD_STATE_NOTVALID) THEN RESPONSE #100 SetGlobal("ESTarneshScroll","GLOBAL",1) RealSetGlobalTimer("ESCommentBookTime","GLOBAL",10) END IF RealGlobalTimerExpired("ESCommentBookTime","GLOBAL") Global("ESTarneshScroll","GLOBAL",1) InParty(Myself) InMyArea(Player1) !StateCheck(Myself,CD_STATE_NOTVALID) !StateCheck(Player1,CD_STATE_NOTVALID) THEN RESPONSE #100 SetGlobal("ESTarneshScroll","GLOBAL",2) StartDialogueNoSet(Player1) END D file: /*Eirik's Interjections go here. This file appends ESEIRIKJ. * CONTENTS: * Tarnesh's spellbook */ BEGIN ~ESEIRIKJ~ /* Tarnesh's spellbook */ CHAIN IF WEIGHT #-1 ~Global("ESTarneshScroll","GLOBAL",2)~ THEN ~ESEIRIKJ~ ESTarneshComment @2009 == ~ESEIRIKJ~ IF ~InParty("imoen") InMyArea("imoen") !StateCheck("imoen",CD_STATE_NOTVALID)~ THEN @2000 == ~_IMOEN2~ IF ~InParty("imoen") InMyArea("imoen") !StateCheck("imoen",CD_STATE_NOTVALID)~ THEN @2001 == ~ESEIRIKJ~ IF ~InParty("imoen") InMyArea("imoen") !StateCheck("imoen",CD_STATE_NOTVALID)~ THEN @2002 == ~_IMOEN2~ IF ~InParty("imoen") InMyArea("imoen") !StateCheck("imoen",CD_STATE_NOTVALID)~ THEN @2003 == ~ESEIRIKJ~ @2004 //shows up all the time END ++ @2005 DO ~SetGlobal("ESTarneshScroll","GLOBAL",3)~ EXTERN ~ESEIRIKJ~ escommentscroll1 ++ @2006 DO ~SetGlobal("ESTarneshScroll","GLOBAL",3)~ EXIT ++ @2007 DO ~SetGlobal("ESTarneshScroll","GLOBAL",3)~ EXTERN ~ESEIRIKJ~ escommentscroll2 CHAIN IF ~~ THEN ~ESEIRIKJ~ escommentscroll1 @2008 END IF ~HasItem("_SCRLTARN",Player1)~ THEN DO ~ActionOverride(Player1,GiveItem("_SCRLTARN","eseirik"))~ EXIT IF ~HasItem("_SCRLTARN",Player2)~ THEN DO ~ActionOverride(Player2,GiveItem("_SCRLTARN","eseirik"))~ EXIT IF ~HasItem("_SCRLTARN",Player3)~ THEN DO ~ActionOverride(Player3,GiveItem("_SCRLTARN","eseirik"))~ EXIT IF ~HasItem("_SCRLTARN",Player4)~ THEN DO ~ActionOverride(Player4,GiveItem("_SCRLTARN","eseirik"))~ EXIT IF ~HasItem("_SCRLTARN",Player5)~ THEN DO ~ActionOverride(Player5,GiveItem("_SCRLTARN","eseirik"))~ EXIT IF ~HasItem("_SCRLTARN",Player6)~ THEN DO ~ActionOverride(Player6,GiveItem("_SCRLTARN","eseirik"))~ EXIT CHAIN IF ~~ THEN ~ESEIRIKJ~ escommentscroll2 @2008 EXIT TRA: /* eseirikj.d */ @2000 = ~'Let no one carve runes to cast a spell, save first they learn to read them well.' This is the wisdom of the runthanes. You would do well, Imoen, to heed <CHARNAME>'s advice.~ @2001 = ~I 'spose yer right. What about these... runethanes, did you call them?~ @2002 = ~Among my people, the runethanes work the arts of magic through ancient symbols of power. King Hallbjorn, of the House of Magnor, is a clever hunter and clever with weapons as well. But he is also a runecaster -- he can stop storms, understand the birds, ease sorrows and give peace to the mind.~ @2003 = ~Eirik, just between you and me, <CHARNAME> could use some peace of mind right now.~ @2004 = ~What troubles thee <CHARNAME>?~ @2005 = ~*Hand Eirik the scroll*~ @2006 = ~Nothing important... Eirik... I just have a lot on my mind, I'll be alright. Let's go inside, shall we?~ @2007 = ~It appears there is a bounty on my head.~ @2008 = ~Well, well! You have not told me all concerning yourself; and how it is that you have a bounty on your head?~ @2009 = ~*a puzzled look quickly changes to one of concern*~ Link to comment
devSin Posted February 26, 2007 Share Posted February 26, 2007 Real timers run as long as the game is running (and active? I've never tested switching out to another app). Just pause the game and smoke a cigarette; the timer will expire when you get back. Real time is updated continuously; game time is only updated while the game is running in an unpaused state. escommentscroll1 isn't accounting for the small possibility that nobody has the scroll when the dialogue fires (NO VALID LINKS OR REPLIES). You don't really need a trigger; TakePartyItem() will cause Eirik to take the item regardless of who currently has it (note that both GiveItem() and TakePartyItem() will mark the item unstealable). Link to comment
EiriktheScald Posted February 26, 2007 Author Share Posted February 26, 2007 The dialogue shouldn't fire if the party doesn't take the scroll (there's a check for it in the baf). But your solution is simpler -- I like that. Link to comment
Miloch Posted February 26, 2007 Share Posted February 26, 2007 Eh... you have scripting and dialog issues in your TP2 thread and TP2 issues in your scripting thread... Just a minor observation... this: @2009 = ~*a puzzled look quickly changes to one of concern*~...could easily be dialog (e.g., ~In truth, it puzzled me at first, but now it worries me.~). As I guess could:@2005 = ~*Hand Eirik the scroll*~ (e.g., ~Perhaps you can make something of this scroll.~) Link to comment
EiriktheScald Posted February 26, 2007 Author Share Posted February 26, 2007 Eh... you have scripting and dialog issues in your TP2 thread and TP2 issues in your scripting thread... It's insane, isn't it? Just a minor observation... this:@2009 = ~*a puzzled look quickly changes to one of concern*~...could easily be dialog (e.g., ~In truth, it puzzled me at first, but now it worries me.~). I'll give you that one. Whatever it is, it has to segue into either the imoen/book dialog or directly into the PC/Scroll dialog (should imoen not be in the party). As I guess could:@2005 = ~*Hand Eirik the scroll*~ (e.g., ~Perhaps you can make something of this scroll.~) Hard to convey; but if you were in shock, you'd probably just hand them the note as well, without saying a word. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.