Jump to content

Home

Spawning NPCs


Ravager

Recommended Posts

Then you can name this script, after changing "tag_of_utc" and "onenter_old", to the onEnter script for your module and then create a copy of the old onEnter script and rename it.

void main() {
   // Check to see if it has already been spawned
   if(!GetIsObjectValid(GetObjectByTag("[color=cyan]tag_of_utc[/color]")))
       CreateObject(OBJECT_TYPE_CREATURE, "dan13_deesra", Location(Vector(60.82,46.78,4.92), 0.0));

   // Fire old script
   ExecuteScript("[color=cyan]onenter_old[/color]", OBJECT_SELF);
}

 

Hope that helps, and it is worth reading through the thread Stream suggested. ;)

http://www.lucasforums.com/showthread.php?t=143536

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...