Hi, everyone. Been trying to get this to work (it’s part of a script meant to be called by an item I created when the player uses the item’s special power):
location lTarget = GetLocation(oPC); //Yes, I remembered to specify what oPC is.
ActionCastSpellAtLocation(SPELL_STORM_OF_VENGEANCE, lTarget, METAMAGIC_ANY, 1, 1);
Now Storm of Vengeance is a spell that works over an area rather than a targeted spell, so I left out the bit in the ActionCastSpellAtLocation where I had to specify the Projectile Path Type. It compiled nicely – but didn’t work.
I tried substituting other spells like SPELL_ENTANGLE and SPELL_GREASE (which as we know are also spells that work over an area rather than targeted spells). Still didn’t work. To find out if the problem might lie elsewhere in the script, I placed another line of script just before the ActionCastSpellAtLocation line of script above, which went:
AssignCommand(oPC, SpeakString(“Abracadabra!”));
This line worked, so the entire script had no problem – only the ActionCastSpellAtLocation line of script.
Tried changing the bInstantSpell specification right at the end of the line from 1 to 0. Still no good.
What gives here? How do I make the thing work? Is it that there’s something about the nature of the spells I listed above that makes ActionCastSpellAtLocation unsuitable for them? I thought of switching to ActionCastSpellAtObject, except I don’t want the player to be the target object for the spells! So what can I do? Any help will be appreciated, thanks!