Jump to content

possible flaw in targeting of combat scripts


Guest newwavedave30a

Recommended Posts

Guest newwavedave30a

hey, so for the most part, everything in scs seems to be working great. but i was just fighting some sirines and noticed they kept casting dire charm on jaheira and then sometimes coran, even though they're both elves and are immune. so i checked out the sirine script in NI and noticed that every block aimed at a particular class uses the PC.0.0.whateverclass object in the triggers repeatedly to identify targets (including the one where it checks to see if the PC is an elf) and then also in the subsequent action. i think maybe it doesn't work consistently when they're used that way.

 

suspecting that might be the problem, i edited the script so that the See([PC.0.....]) line in each block came right after the HaveSpell triiger at the top, and then i changed the rest of the of the PC.0.... references following the See trigger to LastSeenBy(). i also changed the generic PC block to refer to Nearest([PC]) instead. then i tested it out and now it works like... well like a charm (so to speak ???) and the sirines are only using their dire charms on the non-elves in the party. i also just tested it without doing one or the other of these two things and neither of them worked properly. it seems just using "PC" or even "PC.0....class" is too generic a reference for a specific target.

 

Normally when I find things like this i just change them myself and move on but i think this method of targeting is used in a lot of the scs scripts, and without much knowledge of coding myself and with the complexity of scs i don't even know where to begin. so if i'm right in thinking this is a bug, do you think you could do an update that fixes it? and maybe one for scsII as well if the same problem occurs there? oh and btw, this was the mac version... though i don't think that makes a difference here. in any case, thanks for cool mods, you rock!

Link to comment

That's interesting - not something I've come across before. (I guess it's possible that there's some difference in implementation of the game engine between windows and mac.)

 

For technical reasons this isn't easy to fix in a hurry, so it's not likely to make the next release, but I'll keep it in mind.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...