This list of scripting frequently asked questions (and answers) covers some common questions that are not easily categorized elsewhere.
In order to make an NPC disappear you need to add to NPC’s spawn set an empty phase and name it ‘gone’. All you have to do now (e.g. after a dialogue or just whenever you need it) is to change NPC’s phase to ‘gone’. Here’s the script: void main() { SetStoryNPCStoryPhase("spawnset_name", "gone"); } If you want to destroy an NPC you can do: a) teleport an object out of the location and then despawn/kill it. To teleport use ActionJumpToObject b) or you can use DestroyObject – but it doesn’t always work on creatures
This list of scripting frequently asked questions (and answers) covers some common questions that are not easily categorized elsewhere.
In order to make an NPC disappear you need to add to NPC’s spawn set an empty phase and name it ‘gone’. All you have to do now (e.g. after a dialogue or just whenever you need it) is to change NPC’s phase to ‘gone’. Here’s the script: void main() { SetStoryNPCStoryPhase("spawnset_name", "gone"); } If you want to destroy an NPC you can do: a) teleport an object out of the location and then despawn/kill it. To teleport use ActionJumpToObject b) or you can use DestroyObject – but it doesn’t always work on creatures