Author Topic: Spawn creature upon death?  (Read 311 times)

Legacy_Legacy_of_Wrex

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Spawn creature upon death?
« on: October 01, 2012, 12:18:14 am »


               Pretty much what the title says, I've created a hostile "Possessed Fighter" and upon his death, I want a "Ghastly Wraith" to spawn at his location. Scripts not being my strong side, but if it's possible, any help is appreciated. Still rather new at the whole scripting thing.
               
               

               
            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Spawn creature upon death?
« Reply #1 on: October 01, 2012, 12:51:08 am »


               Just replace "resref" with the resref of your wraith (make sure to keep the quotation marks) and put this in the fighter's OnDeath slot:

void main()
{
    CreateObject(OBJECT_TYPE_CREATURE, "resref", GetLocation(OBJECT_SELF));
}

               
               

               


                     Modifié par Squatting Monk, 30 septembre 2012 - 11:51 .
                     
                  


            

Legacy_Legacy_of_Wrex

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Spawn creature upon death?
« Reply #2 on: October 04, 2012, 10:10:11 pm »


               Thanks alot, I'll try it immediatly!