Problems with scores

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.
Post Reply
User avatar
P/o Prune
Site Admin
Posts: 4959
Joined: Mon Jun 24, 2002 9:18 am
Points: 168
Location: Denmark

Problems with scores

Post by P/o Prune »

I think I may have a bit of a problem here.
In my game the player has to kill five monsters. Each monster killed awards the player 20 points. So five monsters killed means 100 points to the player.
The problem is that somehow Adrift adds up all those points so if you kill one monster your score will show 20 points out of 100. This isn't all that bad. It tells the player how many points s/he can obtain in the game. The problem arises when you have more than one task that awards the player points.
Say you have three different tasks that allows you to kill the vampire. Each of them will add 20 points to your score. Even if you put in a restriction where a variable will be given a certain value when you kill the vampire, Adrift, apparently, still adds the other possibilities to the total score. All of a sudden the player will be looking at a total score of 140 points which will never be obtainable.
Is there a way I can get the "true" total score?
D-Day in progress 86Kb (Slowly drifting)
October 31st: 135Kb (My entry for the parser Comp 2022 :wink: )
User avatar
Denk
Posts: 1002
Joined: Mon Feb 22, 2016 6:21 pm
Points: 346
Location: Hjørring, Denmark

Re: Problems with scores

Post by Denk »

As long you create tasks that add to the score, ADRIFT will add those to the MaxScore. But when you are done creating these tasks, just go to the variable folder and open the variable MaxScore. Then you can set it to any value you like, in this case 100.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Lazzah
Moderator
Posts: 2524
Joined: Thu Mar 31, 2011 5:54 am
Points: 100
Location: Clacton-on-Sea, Essex
Contact:

Re: Problems with scores

Post by Lazzah »

If you have three different tasks that can kill the vampire, then I bet the actions in those tasks are all exactly the same, if not very similar. If all the actions contain an action incrementing the Score variable, then you have to adjust the MaxScore variable accordingly after you create all the tasks, as Denk points out.

What I do when there is more than one task with the same actions, is to put the reoccurring actions into a System Task. Let's call it Kill Vampire Score, set to run only if called by event/task.

So, instead of the same actions in each of the tasks where the vampire is killed, you just have one action in each task: Execute Task 'Kill Vampire Score'. This has the added advantage that you do not have to adjust the MaxScore after you create the tasks.

I hope that helps?
Visit "Larry's ADRIFT Text Adventures" at http://LarrysAdriftTextAdventures.co.uk
User avatar
P/o Prune
Site Admin
Posts: 4959
Joined: Mon Jun 24, 2002 9:18 am
Points: 168
Location: Denmark

Re: Problems with scores

Post by P/o Prune »

Thanks to both of you. These are absolutely great advice.
I especially like Lazzah's about the system task.
D-Day in progress 86Kb (Slowly drifting)
October 31st: 135Kb (My entry for the parser Comp 2022 :wink: )
Post Reply