EiriktheScald Posted February 25, 2007 Author Share Posted February 25, 2007 I tried it out, but the dialog didn't trigger, I'm sorry to report. What about this line: PartyHasItem("_SCRLTAR") does it use the file name of the item, the generic name or the identified name? I ask because both the generic and identified names are just "scroll". Link to comment
berelinde Posted February 25, 2007 Share Posted February 25, 2007 This is the BAF I use to get the dialogue to trigger. I'm not worried about which of the scrolls the PC finds. As the first bounty notice the pc finds is likely to be Karlat's in Beregost, I'm all right with no timer. /* if the bounty notice is found on an opponent */ IF InParty(Myself) Global("B!GavinBountyNotice","GLOBAL",0) //Checkvariable CombatCounter(0) !See([ENEMY]) !StateCheck(Player1,STATE_SLEEPING) OR(4) //There are actually 4 bounty notices PartyHasItem("_SCRLKAR") PartyHasItem("_SCRLNEI") PartyHasItem("_SCRL3B") PartyHasItem("_SCRLTAR") !StateCheck(Myself,CD_STATE_NOTVALID) InMyArea(Player1) THEN RESPONSE #100 SetGlobal("B!GavinBountyNotice","GLOBAL",1) StartDialogueNoSet(Player1) END And this is in the D (J file) // Bounty Notice CHAIN IF ~Global("B!GavinBountyNotice","GLOBAL",1)~ THEN ~B!GAVINJ~ BGavinBountyNotice ~Is this a bounty notice? Why would someone want you dead badly enough to put up this kind of gold?~ DO ~SetGlobal("B!GavinBountyNotice","GLOBAL",2)~ = ~We're going to have to work harder to keep you safe.~ EXIT Link to comment
EiriktheScald Posted February 25, 2007 Author Share Posted February 25, 2007 yeah, but I need the timer since imoen has dialog, and I want her's to fire first. Right? Link to comment
berelinde Posted February 25, 2007 Share Posted February 25, 2007 Yes, but that is just adding one more block and having the dialogue trigger on 2 instead of 1. Can you check to see if your global variables are being set, at least? Link to comment
EiriktheScald Posted February 25, 2007 Author Share Posted February 25, 2007 Using GetGlobal("<string>","<string2>")? [Edit:] I checked and ESTarneshScroll is set to 1, which means the timer isn't working? [Edit:] Ah, could it be that 'RealGlobalTimerExpired()' should be 'GlobalTimerExpired()'? Link to comment
berelinde Posted February 25, 2007 Share Posted February 25, 2007 You can always check a global variable by typing in CLUAConsole:GetGlobal("ESTarneshScroll","GLOBAL") If you're curious, you can set it by typing in CLUAConsold:SetGlobal("ESTarneshScroll","GLOBAL",3) //or any other number you like Link to comment
berelinde Posted February 25, 2007 Share Posted February 25, 2007 Hmmmm. Sometimes short timers fail. Maybe you could go for a longer one. Would two minutes be too long to wait for that? Link to comment
EiriktheScald Posted February 25, 2007 Author Share Posted February 25, 2007 That was the problem; should use 'GlobalTimerExpired()' instead. The scroll was not put into Eirik's inventory though. Another thing I thought about: what if another npc picked up the scroll instead? I would have to check each character to see who has it. More trouble than it's worth? Link to comment
berelinde Posted February 25, 2007 Share Posted February 25, 2007 That was the problem; should use 'GlobalTimerExpired()' instead. If you use RealSetGlobalTimer("whatever","GLOBAL",###), you must use RealGlobalTimerExpired("whatever","GLOBAL"). If you use SetGlobalTimer("whatever","GLOBAL",###), then you would use GlobalTimerExpired("whatever","GLOBAL"). The scroll was not put into Eirik's inventory though. Another thing I thought about: what if another npc picked up the scroll instead? I would have to check each character to see who has it. More trouble than it's worth? Yeah, I thought that might be a problem. Might as well forget it. It would have been a nice touch, and it probably is possible, but it would have been a pain in the neck, for very little payback. Link to comment
EiriktheScald Posted February 25, 2007 Author Share Posted February 25, 2007 But I looked in the IESDP and there's no such thing as RealGlobalTimerExpired(). Link to comment
berelinde Posted February 25, 2007 Share Posted February 25, 2007 0x40B6 RealGlobalTimerExpired(S:Name*,S:Area*) NT Returns true only if the timer with the specified name of the specified area has been set at least once and has now expired. Area here can mean GLOBAL. Link to comment
EiriktheScald Posted February 25, 2007 Author Share Posted February 25, 2007 It wasn't listed under actions (where I looked). This is what we had: RealGlobalTimerExpired("ESCommentBookTime","GLOBAL") But I changed it to this, and it works now: GlobalTimerExpired("ESCommentBookTime","GLOBAL") Link to comment
berelinde Posted February 25, 2007 Share Posted February 25, 2007 Then you must be using SetGlobalTimer instead of RealSetGlobalTimer. No big deal, if you're satisfied with the result. Yeah, anything that is a condition for something else to happen is a trigger, the thing that happens is an action. Which explains why you couldn't find it under actions. Anyway, have fun storming the castle. I'm off to sleep. Link to comment
EiriktheScald Posted February 25, 2007 Author Share Posted February 25, 2007 No, here is the script: /* Tarnesh's spellbook */ IF Global("ESTarneshScroll","GLOBAL",0) CombatCounter(0) !See([ENEMY]) PartyHasItem("_SCRLTAR") // Dead("tarnesh") InParty(Myself) !StateCheck(Myself,CD_STATE_NOTVALID) THEN RESPONSE #100 SetGlobal("ESTarneshScroll","GLOBAL",1) RealSetGlobalTimer("ESCommentBookTime","GLOBAL",60) END IF GlobalTimerExpired("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 As you can see, it's using RealSetGlobalTimer(). It wasn't advancing the variable using RealGlobalTimerExpired(), so I changed it to GlobalTimerExpired() and it is working now. Go figure. Link to comment
berelinde Posted February 25, 2007 Share Posted February 25, 2007 I'd really like to see someone else weigh in on this phenomenon. That timer expiry shouldn't work. I wonder why it does. Hey, if you wouldn't mind, maybe you could email me a copy of the alpha and I could see if I could get it to install on my machine? I can handle the setup.exe part, since you're on a Mac, it's different, obviously. But I'd like to have a peek at it's installation and debug, if it's all right with you. I am really curious about that one. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.