theacefes Posted April 26, 2006 Share Posted April 26, 2006 I have a timer: IF InParty(Player1) !ActuallyInCombat() Global("K#TrollAnnoy","GLOBAL", 0) !GlobalTimerNotExpired("TrollTimer","GLOBAL") THEN RESPONSE #100 Dialogue([PC]) RealSetGlobalTimer("TrollTimer","GLOBAL",60) END IF InParty(Player1) !ActuallyInCombat() Global("K#TrollAnnoy","GLOBAL", 1) !GlobalTimerNotExpired("TrollTimer","GLOBAL") THEN RESPONSE #100 Dialogue([PC]) RealSetGlobalTimer("TrollTimer","GLOBAL",60) END IF InParty(Player1) !ActuallyInCombat() Global("K#TrollAnnoy","GLOBAL", 2) !GlobalTimerNotExpired("TrollTimer","GLOBAL") THEN RESPONSE #100 Dialogue([PC]) RealSetGlobalTimer("TrollTimer","GLOBAL",60) END IF InParty(Player1) !ActuallyInCombat() Global("K#TrollAnnoy","GLOBAL", 3) !GlobalTimerNotExpired("TrollTimer","GLOBAL") THEN RESPONSE #100 Dialogue([PC]) RealSetGlobalTimer("TrollTimer","GLOBAL",60) END IF InParty(Player1) !ActuallyInCombat() Global("K#TrollAnnoy","GLOBAL", 4) !GlobalTimerNotExpired("TrollTimer","GLOBAL") THEN RESPONSE #100 Dialogue([PC]) RealSetGlobalTimer("TrollTimer","GLOBAL",15) END IF InParty(Player1) !ActuallyInCombat() Global("K#TrollAnnoy","GLOBAL", 5) !GlobalTimerNotExpired("TrollTimer","GLOBAL") THEN RESPONSE #100 Dialogue([PC]) RealSetGlobalTimer("TrollTimer","GLOBAL",30) END IF InParty(Player1) !ActuallyInCombat() Global("K#TrollAnnoy","GLOBAL", 6) !GlobalTimerNotExpired("TrollTimer","GLOBAL") THEN RESPONSE #100 Dialogue([PC]) RealSetGlobalTimer("TrollTimer","GLOBAL",20) END IF InParty(Player1) !ActuallyInCombat() Global("K#TrollAnnoy","GLOBAL", 7) !GlobalTimerNotExpired("TrollTimer","GLOBAL") THEN RESPONSE #100 Dialogue([PC]) RealSetGlobalTimer("TrollTimer","GLOBAL",30) END IF InParty(Player1) !ActuallyInCombat() Global("K#TrollAnnoy","GLOBAL", 8) !GlobalTimerNotExpired("TrollTimer","GLOBAL") THEN RESPONSE #100 Dialogue([PC]) RealSetGlobalTimer("TrollTimer","GLOBAL",60) END For some reason the installation keeps failing at THEN RESPONSE #100 Dialogue... I've tried using Interact() but I get a stutter bug. Any suggestions? EDIT: Oops, sorry, should have posted the debug. Compiling 1 dialogue file ... [Modders Mod/Dialogues/K#Troll.d] PARSE ERROR at line 28 column 14-17 Near Text: THEN syntax error [Modders Mod/Dialogues/K#Troll.d] ERROR at line 28 column 14-17 Near Text: THEN Parsing.Parse_error ERROR: parsing [Modders Mod/Dialogues/K#Troll.d]: Parsing.Parse_error ERROR: compiling [Modders Mod/Dialogues/K#Troll.d]! Stopping installation because of error. Link to comment
Avenger Posted April 26, 2006 Share Posted April 26, 2006 Well, i would try to type this into dltcep's script editor. It would show the buggy line. Alternatively, you can try to locate line 28 [edit] It is also unhealthy to mix real and ingame timers. Link to comment
theacefes Posted April 26, 2006 Author Share Posted April 26, 2006 My apologies for not comprehending but what do you mean by mxing them? Is there an ingame timer in this that I didn't see? Link to comment
theacefes Posted April 26, 2006 Author Share Posted April 26, 2006 IF InParty(Player1) !ActuallyInCombat() Global("K#TrollAnnoy","GLOBAL", 0) !GlobalTimerNotExpired("TrollTimer","GLOBAL") THEN RESPONSE #100 Dialogue([PC]) RealSetGlobalTimer("TrollTimer","GLOBAL",60) END IF InParty(Player1) !ActuallyInCombat() Global("K#TrollAnnoy","GLOBAL", 1) !GlobalTimerNotExpired("TrollTimer","GLOBAL") THEN RESPONSE #100 Dialogue([PC]) RealSetGlobalTimer("TrollTimer","GLOBAL",60) END The coded part is line 28 Link to comment
Andyr Posted April 26, 2006 Share Posted April 26, 2006 The debug mentions a problem in a .D, not a .BAF. What's the .D file? What Avenger means is you are mixing real-time timers with game-time timers. So use 115 SetGlobalTimer(S:Name*,S:Area*,I:Time*GTimes) instead of 268 RealSetGlobalTimer(S:Name*,S:Area*,I:Time*GTimes), or alternatively the equivalent triggers. Link to comment
Grim Squeaker Posted April 26, 2006 Share Posted April 26, 2006 And the reason for the stutter bug is that Interact() uses the character's B file whereas Dialogue() (and its equivalent actions) use the character's J file. SO if you were the using the wrong one for where you coded the dialogue, it wouldn't be able to fire the talk. Like Andy said, you're setting a RealSetGlobalTimer("TrollTimer","GLOBAL",60) (i.e. real time) but are trying to check a game time timer !GlobalTimerNotExpired("TrollTimer","GLOBAL"), so you'd want !RealGlobalTimerExpired("TrollTimer","GLOBAL"). Either that or change the setting of the timer in the first place to be SetGlobalTimer(...) as opposed to RealSetGlobalTimer(...). Edit: On reading Andy's post again he has a very good point. It's throwing an error with your troll dialogue file not your script file. So have a look there instead. Link to comment
theacefes Posted April 26, 2006 Author Share Posted April 26, 2006 Awesome. I knew it was something that was right in front of me. Thanks! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.