Please note that new user registrations disabled at this time.

possible bug in spellcaster attack script

This forum is to be used for all discussions pertaining to BioWare's Baldur's Gate II: Shadows of Amn.
Post Reply
User avatar
Lucian_Garland
Posts: 172
Joined: Mon Jun 04, 2001 10:00 pm
Contact:

possible bug in spellcaster attack script

Post by Lucian_Garland »

ive noted when spellcaster attack script is on, my chars with it, occassionally attacks my main char..who is a cavalier. pretty annoying if i cant tell keldorn to go whack mages or priest with his carsomyr without him hitting me.
User avatar
Hobbes82
Posts: 10
Joined: Tue May 22, 2001 10:00 pm
Location: cincy
Contact:

Post by Hobbes82 »

Don't mean to be rude, But your post dosn't make alot of sence. Try rewording it , and you will probably get a reply that is worth it. Have a great day!! :p :p
User avatar
Lucian_Garland
Posts: 172
Joined: Mon Jun 04, 2001 10:00 pm
Contact:

Post by Lucian_Garland »

as i meant, WHEN i set the spellcaster attack scrip on one of my npc's, ive noted that the npc will occassionally attack my main char, who is a cavalier. I especially use the spellcaster attack combat script with keldorn, because he use carsomyr.

the spellcaster attack script sets the char to go for enemy spellcasters, supposedly.
User avatar
KensaiRyu
Posts: 622
Joined: Sat Feb 03, 2001 11:00 pm
Contact:

Post by KensaiRyu »

I will take a look at this script and tell you why this is happening.
Wizards Of Eregion Expansion Team Presents:
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
User avatar
KensaiRyu
Posts: 622
Joined: Sat Feb 03, 2001 11:00 pm
Contact:

Post by KensaiRyu »

Heres the script:
_____________________________________________
IF
ActionListEmpty()
OR(4)
See(NearestEnemyOfType([0.0.0.LONG_BOW]))
See(NearestEnemyOfType([0.0.0.CLERIC_ALL]))
See(NearestEnemyOfType([0.0.0.DRUID_ALL]))
See(NearestEnemyOfType([0.0.0.BARD_ALL]))
!Range(LastSeenBy(Myself),10)
THEN
RESPONSE #100
EquipRanged()
AttackReevaluate(LastSeenBy(Myself),30)
END

IF
ActionListEmpty()
OR(4)
See(NearestEnemyOfType([0.0.0.LONG_BOW]))
See(NearestEnemyOfType([0.0.0.CLERIC_ALL]))
See(NearestEnemyOfType([0.0.0.DRUID_ALL]))
See(NearestEnemyOfType([0.0.0.BARD_ALL]))
THEN
RESPONSE #100
EquipMostDamagingMelee()
AttackReevaluate(LastSeenBy(Myself),30)
END

IF
ActionListEmpty()
Help([PC])
THEN
RESPONSE #100
AttackReevaluate(LastAttackerOf(LastHelp(Myself)),60)
END

IF
ActionListEmpty()
See(NearestEnemyOf(Myself))
!Range(NearestEnemyOf(Myself),10)
THEN
RESPONSE #100
EquipRanged()
AttackReevaluate(NearestEnemyOf(Myself),30)
END

IF
ActionListEmpty()
See(NearestEnemyOf(Myself))
THEN
RESPONSE #100
EquipMostDamagingMelee()
AttackReevaluate(NearestEnemyOf(Myself),30)
END
_____________________________________________

The problem is in this line right here:
AttackReevaluate(LastSeenBy(Myself),30)

The last seen by sometimes changes from an enemy to an ally during combat thus causing your friendly fire. I can update this script so this no longer happens and send it to you if you want.Email me if you want this done it would take about 20 seconds.

AstroBouncer@Aol.com
Wizards Of Eregion Expansion Team Presents:
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
User avatar
Lucian_Garland
Posts: 172
Joined: Mon Jun 04, 2001 10:00 pm
Contact:

Post by Lucian_Garland »

sounds good, i emailed you with my adress. you should send the updated version to kevin dorner as this is a bug in the game.
User avatar
KensaiRyu
Posts: 622
Joined: Sat Feb 03, 2001 11:00 pm
Contact:

Post by KensaiRyu »

I sent you a script that checks if the last seen by is not in the party before attacking. Let me know how it works as I dont have time to test. If it works good then I will send it to Kevin Dorner.

If it dosent work then email me or post and I will rewrite the script to utilize a different targeting than Last seen by.
Wizards Of Eregion Expansion Team Presents:
[url="http://www24.brinkster.com/manveru"]Dagor Laureland[/url]
[url="http://groups.yahoo.com/group/IEEAIS"]Infinity Engine Enemy AI Scriptors Council[/url]
User avatar
Lucian_Garland
Posts: 172
Joined: Mon Jun 04, 2001 10:00 pm
Contact:

Post by Lucian_Garland »

ive gotten the script..but unfortunately i wont have much time to play bg2 over the next week..i think youre better having another testing it
Post Reply