Jump to content

Home

"advanced" spawn script


Mindtwistah

Recommended Posts

I'm a rook, but I don't think you need a second script for this.... you just need to set a local or global boolean, and have its value set by death of the NPC in question.

 

That's usually how it's done, though you'd set the variable directly after the character has been spawned. Otherwise you'd get a new copy of the character every time the player leaves and re-enters the area, or every time a savegame is loaded in the area (depending on how the spawn script is set up). Usually you only want a character to spawn once.

 

So you just wrap the spawning part of the OnEnter script in a check, like:

 

if (!GetLocalBoolean(OBJECT_SELF, 40)) {
   SetLocalBoolean(OBJECT_SELF, 40);

    [color=PaleGreen]/// Spawning code here...[/color]
}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...