Skip to content

return Question

ZephiriusZephirius Member Posts: 419
edited February 2022 in Builders - Scripting
I'm having a little problem...
// "Tasha's Fanciful Feather"
    object oUsed9 = GetItemActivated();
    if (GetTag(oUsed9) == "TASHAS_FEATHER")
    {
       if (WillSave(GetSpellTargetObject(), 5, SAVING_THROW_TYPE_MIND_SPELLS))
       {
            effect eSaveFX = EffectVisualEffect(VFX_IMP_WILL_SAVING_THROW_USE);
            ApplyEffectToObject(DURATION_TYPE_INSTANT, eSaveFX, GetSpellTargetObject()); return;
       }
       else
       {
       object oPC = GetItemActivator();
       string sString = "c_goblinwiz_bat1";
       string sDance = "fantabulizer_mus";
       effect eFX = EffectVisualEffect(VFX_COM_HIT_SONIC);
       ApplyEffectToObject(DURATION_TYPE_INSTANT, eFX, GetSpellTargetObject());

       DelayCommand(2.5, AssignCommand(oPC, PlaySound(sString)));
       AssignCommand(oPC, PlaySound(sDance));
       AssignCommand(oPC, VoiceLaugh(TRUE));

       DelayCommand(0.3, AssignCommand(oPC, ActionCastSpellAtObject
       (SPELL_TASHAS_HIDEOUS_LAUGHTER, GetSpellTargetObject(), METAMAGIC_ANY, TRUE, DOMAIN_MAGIC, PROJECTILE_PATH_TYPE_DEFAULT, TRUE)));
       DelayCommand(1.5, FloatingTextStringOnCreature("Tickle, tickle, tickle...", oPC));
       }
    }

I don't want any of the stuff happening if GetSpellTargetObject() makes his will save???

Comments

  • NeverwinterWightsNeverwinterWights Member Posts: 339
    edited February 2022
    Looks like it's an item activated script. Try replacing GetSpellTargetObject(); with GetItemActivatedTarget();
    Post edited by NeverwinterWights on
Sign In or Register to comment.