There have been times I would like AXMA to remember a variable between sessions.
One use would be for achievements. The game would remember if you defeated the Uber-Goblin at some point between play sessions and be able to display it in a list of other accomplishments.
If there were a way to check them like variables, this could also be useful for a feature - say if the game knows the player has played before, it will offer an option to skip the introduction.
I assume this type of thing would need to be written to a file or into a cookie in memory.
The code format I'd imagine would be something like:---
You kill the Uber-Goblin and he crashes to your feet!
<<achieve $$$killedgoblin = true 'You have defeated the Uber-Goblin!'>>
---
<<if $$$killedgoblin eq true>>
You've already defeated the Uber-Goblin long ago, so the cave is empty.
<<else>>
The Uber-Goblin roars out of his cave!
<<endif>>
---
Your list of Achievements:
<<if !$$$princess>>
You still need to rescue the Princess.
<<elseif $$$princess eq 1>>
You have made it to the Princess's tower, but you haven't rescued her.
<<elseif $$$princess eq 2>>
<<print $$$princess>>
<<endif>>
[where <<print $$$achievement>> displays any text set for the variable, "You have defeated the Uber-Goblin!" or the value if it is a number and there is not text.]<<achieve $$$class 'Paladin'>>
You are a <<print $$$class>>.
<<if $$$class eq 'Paladin'>>
No, you can't use that bladed weapon, Paladins are not allowed that.
<<endif>>
---
<<clear $$$killedgoblin>> [erases individual achievements so they do not exist anymore]
[[Respec your character.|selectclass {$$$class = ''}>>
<<if !$$$class>>
You need to select a class for your character.
<<endif>>
<<clear achievements>> [erases every achievement in the file/cookie so the game could be reset completely and respond to !$$$achievement]
Achievements would behave otherwise like variables and could be set and updated the same way.You set off on your adventure!
<<achieve $$$playcount++>>
<<if $$$playcount gt 10>>
Wow, you really must like this game!
<<endif>>
You have played this game <<print $$$playcount>> times!
Отредактировано HanonO (04.11.2017 19:21)
Неактивен