When I use this nothing happens, whereas a few test things I put there (such as spawning visual effects or non-summon creatures) works.
One post i’ve read suggests that this script is treating the item as the “Summoner” not the player using it, thus the summon doesn’t work, but the post didn’t show how they got around it. Anyone able to help with this?
The module event scripts run as the module not the PC or the item, which also means OBJECT_SELF is the module. You can use GetItemActivator() to get the PC who activated the item and then assign them commands to the PC as needed.
This shows one way to get the code you need to run as the PC. In this case it’s not the application of the effect that matters but the creation of the effect. The PC has to run the EffectSummonCreature call.
You can also do this by making the code into a function (which returns void) and using AssignCommand(). e.g. AssignCommand(bob, doSummon(lTarget));
Then you don’t need an extra script. But the ExecuteScript method show in the lexicon will work just fine.