EffectSummonCreature
Zephirius
Member Posts: 419
on activate code -
Trying to have the player summon a golem with a magic rod. My code does squat. Nothing. No golem appears. I'm uncertain as to whether or not my expectations are realistic or not. Is the function supposed to "summon" a critter to be placed into the PC's faction? That's what I'm looking for. As for now, nothing happens???
Any help? Well, you know the drill...
// Rod of the Bone Golem oPC = GetItemActivator(); object oUsed5 = GetItemActivated(); if (GetTag(oUsed5) == "ROD_B_GOLEM") { effect eSummon = EffectSummonCreature("gulgotha", VFX_NONE); ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetItemActivatedTargetLocation(), 1800.0); }
Trying to have the player summon a golem with a magic rod. My code does squat. Nothing. No golem appears. I'm uncertain as to whether or not my expectations are realistic or not. Is the function supposed to "summon" a critter to be placed into the PC's faction? That's what I'm looking for. As for now, nothing happens???
Any help? Well, you know the drill...
0
Comments
and you are trying to summon it using an item - the rod. Maybe that is the problem?
TR
The final parameter should be the duration in seconds - 30 minutes might seem a little brief - I notice that official code tends towards 24 hours or more - not sure whether that makes any difference.
As I understand it, it depends what the script is running on (from the module's point of view) so if it's running on the PC, it should work. My first guess would be that Proleric has it right and the ResRef is incorrect, so the creature is not being summoned because nothing with that ResRef exists.
Code I'm using now -
Do you have tag-based scripting enabled and is the name of the script the same as the tag of the item?
If you don't do this already, I have a creature placed in my module tagged "SCREAMER" and anytime my code doesn't work I put this line all over in to have it shout as each step occurs.
I thought I had an example of exactly what you're doing here, but it turns out I put the item property Cast Spell: Summon Creature (1 use/day) on it, then edited nw_s0_summon to create the creature.
My function to summon the creature does some other things but essentially looks just like what you wrote above to summon yours.
I tried this OnActivateItem script with no luck.
I
TR
That should work with an item, too.
That was going to be my suggestion too. Code fragment: