Quest Script

From RPG Creation Kit
Jump to navigation Jump to search

A Quest Script is a type of script that runs periodically while a Quest is active. Quest Scripts are widely used and are extremely useful when you need to catch an event that can occur at different time, or more specifically, an event that you don't exactly know when it will occur.

Quest Script are the standard way, for example, to update quests that requires a certain NPC to be killed, and this situation is the perfect example to its use. We know that the NPC will have to die, and we know we want to update the quest after he dies, but we can't exactly know when this will happen. The Quest Script will periodically check for the status of the NPC, when he will be dead, the Quest Script will detect that and run some lines of code to update the quest.

We've seen multiple uses of Quest Scripts in the A First Look tutorial.

You can create a Quest Script by right-clicking in the Project Window -> Create -> RPG Creation Kit -> C# -> Quests -> Quest Script.

Once created, a Quest Script will have to be assigned in the Quest Window to the respective quest.


If you know that at a determined stage you want to execute some piece of code, use Quest Stage Scripts instead.