DavidW Posted August 28, 2007 Share Posted August 28, 2007 Sorry if you already know about this, but I couldn't find it mentioned. We're finally trying out Gavin - very cool so far, but there's a slight glitch in the AI of the thugs we ran into in a house in western Beregost. The thugs have the block IF Global("<something>","GLOBAL",1) THEN RESPONSE #100 Enemy() END This actually causes them to freeze - it keeps triggering, they keep resetting as Enemy(), and they don't get to the melee bit. I think you probably want IF Global("<something>","GLOBAL",1) !Allegiance(Myself,ENEMY) THEN RESPONSE #100 Enemy() END (Didn't stop our 1st level party being wiped out by the cleric, though - guess we'll find a better time to come back in due course...) Link to comment
berelinde Posted August 29, 2007 Share Posted August 29, 2007 Ah. Thanks. Looking at what you posted, I can see that I should probably also include a check variable, or it will loop. Scripts. Not my strong suit. Aren't you glad you let me use the cleric script? Link to comment
DavidW Posted August 29, 2007 Author Share Posted August 29, 2007 Ah. Thanks. Looking at what you posted, I can see that I should probably also include a check variable, or it will loop. No, you don't need to - once you've been through once, they count as ENEMY, so the Allegiance check doesn't come up true. (Basically you can do it my way, via the !Allegiance trick, or you can set a check variable as you suggest. Either works fine.) Link to comment
berelinde Posted August 29, 2007 Share Posted August 29, 2007 Ah, thanks for clarifying that! I've added it to the to do list. I've currently sent the mod out for cleaning... er, I mean, cmorgan has the working copy for crossplatform conversion, so I'll make those changes as soon as I get it back. Link to comment
cmorgan Posted August 29, 2007 Share Posted August 29, 2007 ?? Did you clean this already, b? I can't find the relevant blocks... Searching for: Enemy() GAVIN\BAF\B!ROSBA_.baf(7): Enemy() GAVIN\BAF\B!ROSBA_.baf(28): Enemy() GAVIN\BAF\B!ROSBA_.baf(37): Enemy() GAVIN\BAF\B!ROSBA_B.baf(7): Enemy() GAVIN\BAF\B!ROSBA_B.baf(28): Enemy() GAVIN\BAF\B!ROSBA_B.baf(37): Enemy() GAVIN\BAF\B!ROSBA_C.baf(7): Enemy() GAVIN\BAF\B!ROSBA_C.baf(28): Enemy() GAVIN\BAF\B!ROSBA_C.baf(37): Enemy() GAVIN\Quest\QuestBAF\B!BERTRA.baf(18): Enemy() GAVIN\Quest\QuestBAF\B!BERTRA.baf(251): Enemy() GAVIN\Quest\QuestBAF\B!PENNY.baf(19): Enemy() GAVIN\Quest\QuestBAF\B!THUG1.baf(22): Enemy() GAVIN\Quest\QuestBAF\B!THUG2.baf(22): Enemy() GAVIN\Quest\QuestBAF\B!THUG3.baf(22): Enemy() GAVIN\Quest\QuestBAF\B!VALER.baf(32): Enemy() GAVIN\Quest\QuestBAF\B!VALER.baf(294): Enemy() GAVIN\Quest\QuestDLG\B!Quest.d(355): IF ~~ THEN DO ~SetGlobal("B!GavinRomanceActive","GLOBAL",3) SetGlobal("B!GavinNoReturn","GLOBAL",1) SetGlobal("B!GavinOffend","GLOBAL",20) SetGlobal("B!GavinBetrayed","GLOBAL",3) SetGlobal("GavinJoined","GLOBAL",0) ChangeAIScript("",DEFAULT) LeaveParty() Enemy()~ EXIT GAVIN\Quest\QuestDLG\B!Quest.d(360): IF ~~ THEN DO ~SetGlobal("B!GavinOffend","GLOBAL",20) SetGlobal("B!GavinBetrayed","GLOBAL",3) SetGlobal("GavinJoined","GLOBAL",0) ChangeAIScript("",DEFAULT) LeaveParty() Enemy()~ EXIT Found 19 occurrence(s) in 10 file(s) Link to comment
DavidW Posted August 29, 2007 Author Share Posted August 29, 2007 It's in B!THUGx on my (i.e., the current public download) version, I think. Link to comment
berelinde Posted August 29, 2007 Share Posted August 29, 2007 Will check when I get it all back. If Bertram kicked the snot out of DavidW's level one party, though, I'm guessing his script, at least, worked. Link to comment
cmorgan Posted August 29, 2007 Share Posted August 29, 2007 You did both: /* Moving Thug1 */ IF Global("B!Thug1Exists","GLOBAL",1) Global("B!Thug1Move","GLOBAL",0) THEN RESPONSE #100 MoveBetweenAreas("FW3337",[380.325],0) SetGlobal("B!Thug1Move","GLOBAL",1) END /* Combat */ IF !Allegiance(Myself,ENEMY) Global("B!ThugAttack","LOCALS",0) OR(2) Global("B!QuestAttack1Floor","GLOBAL",1) AttackedBy([ANYONE],DEFAULT) THEN RESPONSE #100 SetGlobal("B!ThugAttack","LOCALS",1) Enemy() END IF Allegiance(Myself,ENEMY) See(NearestEnemyOf()) THEN RESPONSE #100 Attack(NearestEnemyOf()) END Link to comment
berelinde Posted August 29, 2007 Share Posted August 29, 2007 Ah, thanks! That's a relief! Now that I think about it, I seem to remember Yovanneth being involved in that solution somehow. I'll have to check the forums again before updating the docs. But thanks to both CM and DW for looking into it! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.