Guest Durlag Posted November 24, 2005 Share Posted November 24, 2005 I am scripting a PC whom is capable of casting spells with only a single hand, which results in two spells when only one is cast. I have NPCs who have this capability (including a Pit Fiend that can cast nine spells), but I have run into a great deal of difficulty with a player character running this ability. Traditionally, NPCs using this ability are somewhat easy to script, as seen here: IF See([PC]) THEN RESPONSE #64 ForceSpell(NearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE) ReallyForceSpell(SecondNearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE) END When working with a PC, though, I run into difficulties in selecting targets. What I want is to cast a spell, and have the script recognize which monster the spell was cast on, initiating the ForceSpell on an entirely different creature. Various problems arise. I could end up in a spell-casting loop, with the ForceSpell condition being satisfied every round and only being cancelled out by death of the PC, NPC, or an override. I cannot target any specific monster with the trigger (IE, no SpellCast(Myself,WIZARD_MAGIC_MISSILE,NearestEnemyOf(Myself)) kind of action), thus resulting in limited AI (casting the same spell on one monster). Any suggestions of this, aside from completely restricting manual spellcasting and relying solely on the script? Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.