ObLars Posted March 4, 2012 Share Posted March 4, 2012 (edited) Hello. Im making a quest where i need to kill 8 different NPC's. I've set up a new script etc.But i need to know which functions i could use. Right now it's "Event OnDeath(Actor killer)" But that one makes the quest proceed once i've killed one of the bandits, whilst i need something to work for 8 npc's. Anyone know which function would work better? Any help would be appriciated :) Edited March 4, 2012 by ObLars Link to comment Share on other sites More sharing options...
Leeira Posted March 4, 2012 Share Posted March 4, 2012 Maybe if (Event OnDeath(Actor killer) if (Event OnDeath(Actor killer) if (Event OnDeath(Actor killer)...else and so on while you use one npcs after another.I'm not quite familiar with papyrus so maybe it won't work, just give it a try. Link to comment Share on other sites More sharing options...
ObLars Posted March 4, 2012 Author Share Posted March 4, 2012 Maybe if (Event OnDeath(Actor killer) if (Event OnDeath(Actor killer) if (Event OnDeath(Actor killer)...else and so on while you use one npcs after another.I'm not quite familiar with papyrus so maybe it won't work, just give it a try. How this this work? Is it "Event OnDeath(Reference" ? Link to comment Share on other sites More sharing options...
Leeira Posted March 4, 2012 Share Posted March 4, 2012 Are there no things like this? if a=1 set x=1;else set.a=a+1; or more complex:if a=1;if b=1 set.x=1;else set.a=a+1 The last thing will check if a=1 if not set.a=a+1. If a=1 and b=1 it will set.x=1. If a=1 but b=!0 it will set.a=a+1.I don't mean that this code snippet is supposed to be useful to you, just an example of what to use if/else for. And Python supports if/else, doesn't it? Link to comment Share on other sites More sharing options...
fg109 Posted March 5, 2012 Share Posted March 5, 2012 Try adding a int property to your quest script, ie KillCounter. For the script on the NPCs, have them increment the counter by 1 when the actor dies. Something like this: ;;;;; QuestScript property Quest01 auto ;"QuestScript" should be the actual name of your quest script Event OnDeath(Actor akKiller) Quest01.KillCounter += 1 if Quest01.KillCounter >= 8 ;do stuff endif EndEvent ;;;;; Link to comment Share on other sites More sharing options...
Recommended Posts