Hello there,
I am trying to make it possible so that an item upon Unique item use will be able to cast Beholder antimagic ray at the target.
I have tried reworking the x2_s1_beantimagic script and using ExecuteScript command but its not working. Could anyone offer a working code please?
Thanks in advance.
Beholder antimagic on Cast Spell: Unique Item use
Débuté par
Seter
, sept. 16 2012 09:42
#1
Posté 16 septembre 2012 - 09:42
#2
Posté 17 septembre 2012 - 12:21
I think the problem you are running into is that the Activate item script is running on the module. try this.
void main()
{
ExecuteScript("x2_s1_beantimag",GetItemActivator());
}
void main()
{
ExecuteScript("x2_s1_beantimag",GetItemActivator());
}
#3
Posté 17 septembre 2012 - 08:34
I tried that but sadly it does not seem to work.
I have been pounding my head trying to come up with a workable workaround.
I have been pounding my head trying to come up with a workable workaround.
#4
Posté 18 septembre 2012 - 01:24
Try making the item cast spell activate item long range.
This is the script I used to test it. I left the references in to the item, the target, an oPC, though they are not used.
#include "x2_inc_switches"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
if (!nEvent == X2_ITEM_EVENT_ACTIVATE)
return;
object oItem = GetItemActivated();
object oPC = GetItemActivator();
object oTarget = GetItemActivatedTarget();
ExecuteScript("x2_s1_beantimag",GetItemActivator());
}
Btw i assume it works as it made some undead sparkle, which I guess means they are immune to the spell effects.
This is the script I used to test it. I left the references in to the item, the target, an oPC, though they are not used.
#include "x2_inc_switches"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
if (!nEvent == X2_ITEM_EVENT_ACTIVATE)
return;
object oItem = GetItemActivated();
object oPC = GetItemActivator();
object oTarget = GetItemActivatedTarget();
ExecuteScript("x2_s1_beantimag",GetItemActivator());
}
Btw i assume it works as it made some undead sparkle, which I guess means they are immune to the spell effects.
Modifié par ffbj, 18 septembre 2012 - 01:34 .





Retour en haut






