Jump to content

The best way?


Korodic

Recommended Posts

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

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...