Skip to content

Spike Trap Help

Having trouble figuring out how to "cast" manticore spikes from a generic trigger. I want to really nail the PC! :)
I don't think the trigger can cast it. But it really doesn't matter much. I don't think I arranged the ActionCastSpell right. Actually, I don't even think I'm close.

This is what I have so far...
#include "nw_i0_generic"

void main()
{

object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;

int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);

object oTroll = GetObjectByTag("FOREST_TROLL1");
oTroll = GetObjectByTag("FOREST_TROLL2");
oTroll = GetObjectByTag("TROLL_SHAMAN");

ActionCastSpellAtObject(SPELLABILITY_MANTICORE_SPIKES, oPC, METAMAGIC_ANY,
FALSE, 30, PROJECTILE_PATH_TYPE_ACCELERATING, TRUE);

object oTarget;
oTarget = oTroll;

AdjustReputation(oPC, oTarget, -100);

SetIsTemporaryEnemy(oPC, oTarget);

ActionAttack(oPC);

DetermineCombatRound(oPC);

}

Comments

  • ZephiriusZephirius Member Posts: 411
    edited March 2021
    object oSpikes = GetObjectByTag("SPIKES");
    AssignCommand(oSpikes, ActionCastSpellAtObject(SPELLABILITY_MANTICORE_SPIKES, oPC, METAMAGIC_ANY,
    FALSE, 30, PROJECTILE_PATH_TYPE_ACCELERATING, TRUE));
    

    Just added an invisible object "oSpike" and AssignCommand to the spell/trap. Works great now. I'm such a bonehead! :#
Sign In or Register to comment.