Hello my fellow CoGgers. I am currently enjoying a holiday in Wales with my wife and kids. Because of the holiday I haven’t wrote at all, well at least until last night. I couldn’t sleep so was working on an opening to a new project. (I intend to have fully written opening chapters for 3/4 games and then let people decide which one I finish first).
Now back to the post’s title. Well during the writing of this opening chapter I came up with a code that allows the writer to show a choice is available while hiding the actual choice and showing what is required to unlock it but shows the actual choice if the conditions are met.
*title test code
*author Sam Kabell
*comment your code goes here
*create swordplay 50
*create hidden ""
*create condition ""
The enemy soldier draws his sword.
*label swordfight
*if (swordplay >50)
*set hidden "Disarm him"
*set condition "."
*goto fight
*else
*set hidden "Hidden Choice"
*set condition "- [Swordplay >50]"
*goto fight
*label fight
With a snarl, he raises his sword.
*choice
#Try and block his attack.
*if (swordplay >50)
You easily parry his attack knocking him off balance.
*goto endfight
*else
You barely manage to block his attack, knocking you off balance.
*set swordplay %+5
*goto swordfight
#Try and attack him.
*if (swordplay >50)
Your attack catches him off guard and your strike knocks him off balance.
*goto endfight
*else
Your sword cuts nothing but air and he parries your blade, knocking you off balance.
*set swordplay %+5
*goto swordfight
*selectable_if (swordplay >50) #${hidden}${condition}
The soldier lunges for you, sword poised to pierce your chest, but you step to the side and divert the thrust knocking him of balance and disarming him.
*goto endfight
*label endfight
While the enemy soldier was off balance, he can't stop your sword piercing his chest.
*ending