Korodic Posted August 19, 2011 Share Posted August 19, 2011 What is the best way to make a quest where you kill people? As in... How do I keep track of the people I killed. For example: Here is quest where multiple enemies must be killed, and are the objectives. What should I do to keep track of their deaths, and when they are dead... advance the stage? Quest script? or can a result script in the quest stage watch for it? I'm thinking script but im not sure. Also off topic question. In scripting what is the AND function in logic. Such as if (x==y) AND (y==z) then do THIS? Figured I'd ask that while im here too. Link to comment Share on other sites More sharing options...
rickerhk Posted August 19, 2011 Share Posted August 19, 2011 If you want them dead in a sequence of quest objectives, then have the On Death block of the NPC set the current objective complete and set the next objective displayed. AND is the &&if (x==y) && (y==z) Link to comment Share on other sites More sharing options...
stevie70 Posted August 19, 2011 Share Posted August 19, 2011 If you want them dead in a sequence of quest objectives, then have the On Death block of the NPC set the current objective complete and set the next objective displayed. AND is the &&if (x==y) && (y==z)... and || is OR Link to comment Share on other sites More sharing options...
Korodic Posted August 19, 2011 Author Share Posted August 19, 2011 If you want them dead in a sequence of quest objectives, then have the On Death block of the NPC set the current objective complete and set the next objective displayed. I understand how to set the objective... but... there is one objective; kill them all. How would I go about that? Link to comment Share on other sites More sharing options...
Glenstorm Posted August 19, 2011 Share Posted August 19, 2011 There are many ways you can do this. You could specify a check in GameMode in the quest script which checks whether each of them are dead (<NPCRef>.GetDead I think) and advance the stage accordingly. Another way (I would do it this way) is to make a script like below scn killTargetScript BEGIN OnDeath set ABC.killCount to ABC.killCount + 1; if ABC.killCount >= ABC.maxTargets ;advance quest here endif END Here ABC is the quest name and the variables shown are defined in the quest itself. Then simply attach the script to the NPCs/Creatures you want killed. Make sure to set maxTargets to the total number of targets. Link to comment Share on other sites More sharing options...
Recommended Posts