Author Topic: Help with summoning script  (Read 325 times)

Legacy_Jackrabbit_Slim

  • Jr. Member
  • **
  • Posts: 52
  • Karma: +0/-0
Help with summoning script
« on: February 08, 2012, 07:07:43 pm »


               I'm trying to make an item that will summon in a creature to act as a companion/familiar. I can get the creature to spawn but it does not show under my character like a companion/familiar should. It just stands there and will not follow me. What am i missing? Below is the script im using.

Thanks!

[nwscript]

/*
 *  Script generated by LS Script Generator, v.TK.0
 *
 *  For download info, please visit:
 *  http://nwvault.ign.c....Detail&id=1502
 */

void main()
{
    object oSpawn;
    effect eVFX;
    object oEventItem = GetItemActivated();
    object oActTarget = GetItemActivatedTarget();
    location lActTarget = GetItemActivatedTargetLocation();
    object oActivator = GetItemActivator();
    object oPC = oActivator;
    // This item must target a location (not an object).
    if ( GetIsObjectValid(oActTarget) )
    {
        SendMessageToPC(oActivator, "Improper use of this item!");
        return;
    }
    // Spawn "james".
    eVFX = EffectVisualEffect(VFX_IMP_RESTORATION);
    oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "valandil", lActTarget);
    DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSpawn));
}

[/nwscript]
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Help with summoning script
« Reply #1 on: February 08, 2012, 07:42:16 pm »


               AddHenchman
               
               

               
            

Legacy_Jackrabbit_Slim

  • Jr. Member
  • **
  • Posts: 52
  • Karma: +0/-0
Help with summoning script
« Reply #2 on: February 08, 2012, 08:44:30 pm »


               Thanks! Works great.