WizWom Posted September 12, 2006 Share Posted September 12, 2006 In BG1, Ajantis starts battles with the evil characters in the party from BAJANTI with: Attack([0.0.0.0.0.0.MASK_EVIL]) Simple, straightforward, and, oddly, he has no code to be unselectable while doing it, or anything else. So, I wanted my PC to join in to this attack, because I'm a good guy, and I won't see someone fight evil without helping. I figured this: IF InParty(LastTargetedBy("Ajantis")) !ActuallyInCombat() THEN RESPONSE #100 MakeUnselectable(6) Attack(LastTargetedBy("Ajantis")) Continue() END But it actually din't pick up on the battle happening. So I tried See(LastTargetedBy("Ajantis")) !ActuallyInCombat() And that didn't work. Nor did See(NearestEnemyOf("Ajantis")) !ActuallyInCombat() Well, at least I get to see Ajantis cut down Xzar over and over. And then say "It it unfortunate that our companion died before he could recant his ways." Link to comment
devSin Posted September 12, 2006 Share Posted September 12, 2006 LastTargetedBy() doesn't work. ActuallyInCombat() works like !CombatCounter(0). I don't think I ever got it to do anything sensible. NearestEnemyOf("AJANTIS") will return the [255] nearest to Ajantis. Link to comment
WizWom Posted September 12, 2006 Author Share Posted September 12, 2006 Hm. I sort of have prepared for this, adding couple values to specific.IDS I guess If I really want, I should have ajantis set the specific for a priority target, and code to attack that. Might make it simpler to participate in the other party battles, too - I just set the specific to make them priority and let the AI decide how to deal wth them. Oh, but then I need to make sure that my AI script is correct and active, that is, not diabled by turning off party AI. yuck. I could so what the other battle scripts do, and put some simple battle scripting in the override script. At least I could do it so I wouldn't have to make target selections. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.