Firestrand - Yeah, I found where it was writing too... it helped a lot. Dulcaion - Yeah, that does seem to be a habit... these scripting bits can be a pain to test at times... it is so damn hard to keep track of everything... Dulcaion & Firestrand - Also, while I am at it, do either of you have any hunches on why the detect spells don't work? The way the detect spells currently work is that they will only work if you cast them before you enter a map. Try casting detect evil before you enter the trader's shop. Detect Evil will work fine then. But if you cast it after you enter the trader's shop it doesn't work. I've looked over those spells a lot but can't seem to figure the problem, but I bet we can get those spells working now if we tried. - Livonya
I'm sorry for resurrecting a thread that is over a year old, but this seems to be the best place to ask my question... It appears to me that ray type spells are broken for NPC's, I have no idea how to fix them, but perhaps some clever scripters can help me out with this problem? By ray type spells, I'm actually talking about lightning bolt (as opposed to ray of enfeeblement - as that is a ranged touch attack) type spells. I was going to use the ray for the black dragon's breath weapon, but instead of targetting the PC's, it seemed to target itself and because the direction couldn't be decided (no line from caster to target - as the target WAS the caster) it went out in ALL directions, anyone got any idea's?
what happens when you get the dragon to cast lightning bolt allyx and put the strategy in the strat.tab? for it?? seems odd.. maybe you should see if ya can get a humanoid caster to cast lightning bolt see if that makes a diff and copy that.? at least then you might know if its npc type that is causing thr prob for sure.
What you need is trigonometry and a modified lightning bolt spell which uses it for NPC's. Give me a bit..... Darmagon
Switch the spell.caster with spell.target_list[0] in the script, but remember to preserve the original caster level and apply the effects to the original target. Remember the game considers spells cast by NPCs as originating from the target, not the caster. That is why those pesky Noble Salamanders can cast a fireball clear across the map to hit your mage.
Okay so it has been more than a "bit" and it will be a little bit longer. Had to do some investigation into exactly how ToEE handles coordinates, rotations, offsets, system handedness etc. Give me until tomorrow.... Below is a first approximation but will not work when too far from the origin of the map.... Darmagon
I've tried that script you posted Darmagon, but couldn't get the spell to actually cast, my test dragon just skips the spell without even trying to cast it, the console debugger didn't shed any light on the problem either, or at least nothing I could understand.