Keeping Score

From ADRIFT 5 Manual Wiki
Revision as of 00:31, 28 August 2013 by Saabie (Talk | contribs) (Can now increase variable. Added pictures)

Jump to: navigation, search

In an interactive fiction game it is quite common to have a scoring system in order to give the player an idea of how much of the game has been completed, and how much remains. If it is possible to complete the game without obtaining the maximum possible score, then this also gives an incentive for the player to play the game again to try to obtain the missing points.

The most common scoring system gives the player points when they perform an action that is important to continuing towards finishing the game successfully. For example, if they need to have a particular object with them in order to complete the game, we could give them points when they find it and pick it up. But we only want to give them points the first time that they do this, otherwise they could simply keep putting the object down and picking it up again until they reach the maximum score.

Fortunately ADRIFT provides us with some special variables that not only prevent the player from obtaining the same points more than once, they also automatically keep track of the total amount of points that can be obtained.

These variables are %Score% and %MaxScore%.

To give the player 12 points for picking up a particular object, we would create a specific task for that object which overrides the "Take Objects (Parent Task)" general task. To it you can add a variable action that increases the "Score" variable by the value 12.

ActionScoreIncr.jpg

If you did this with any other variable then 5 would be added to the variable every time you pick that object up, but, because %Score% is a special variable that can only be updated once by a given task, %Score% will only have 5 added to it the first time you pick up the object.

If your task contains a message like "You have received 12 points for obtaining the magic bean" then you won't want to display that message the next time they pick up the bean. To do that you can either ensure that the "Task is repeatable" tick-box is NOT ticked, or you can use an alternate description that has been set to only display once.

Whenever you increase to value of variable %Score% in a task, it automatically adds that value to the %MaxScore% variable. The Developer displays the current value of MaxScore in the status bar at the bottom of the window.

StatusBarMaxScore.jpg

If you remove the action from the task then ADRIFT will subtract that value from %MaxScore%. Hence the %MaxScore% variable will always contain the maximum score that the player can obtain if they execute every task which adds to the %Score% variable.


<<< Adding Characters Introductory TutorialsIntermediate Tutorials: "How_do_I...?" >>>