th3overseer Posted December 15, 2016 Share Posted December 15, 2016 Howdy. So I imagine this is probably simple, but there are two things I need a bit of help with. The first one is that in one of the quests I'm working on, after it's over, I'd like an NPC to appear at an area only if a different NPC in the quest wasn't killed. I've already put the NPC were he needs to go and set him as initially disabled, I just need to know how to enable him once the quest is finished and a different quest NPC was left alive. Second one isn't quest related. There's a handful of unique NPCs I've added to the worldspace. If the player kills every one of them, I'd like it to spawn a different NPC, but only if every one of those other dudes are killed. How do? Link to comment Share on other sites More sharing options...
Ladez Posted December 15, 2016 Share Posted December 15, 2016 For the first one you can do the following inside your finishing quest stage result script. if NPCThatMustBeAliveRef.GetDead == 0 NPCAppearOnlyIfOtherNPCIsAliveRef.Enable endif For the second one, add a script to the NPCs that increments a global or a quest variable when they die. begin OnDeath set UniqueNPCsKilled to UniqueNPCsKilled + 1 end Then use a quest script to do the spawning. begin Gamemode if UniqueNPCsKilled >= 5 NPCAppearOnlyIfFiveUniqueNPCsAreDeadRef.Enable endif end Link to comment Share on other sites More sharing options...
th3overseer Posted December 16, 2016 Author Share Posted December 16, 2016 For the first one you can do the following inside your finishing quest stage result script. if NPCThatMustBeAliveRef.GetDead == 0 NPCAppearOnlyIfOtherNPCIsAliveRef.Enable endif For the second one, add a script to the NPCs that increments a global or a quest variable when they die. begin OnDeath set UniqueNPCsKilled to UniqueNPCsKilled + 1 end Then use a quest script to do the spawning. begin Gamemode if UniqueNPCsKilled >= 5 NPCAppearOnlyIfFiveUniqueNPCsAreDeadRef.Enable endif end Thanks, man. I got the first script working just as it should. I'm a bit stuck on the second, with the global/quest variable bit, though. Is that something I would make, or how would I do that? Link to comment Share on other sites More sharing options...
Jokerine Posted December 16, 2016 Share Posted December 16, 2016 Seddon has a good tutorial on how to make a counter tracker script thingamabob. Link to comment Share on other sites More sharing options...
Recommended Posts