I'm having some trouble with my first choice tale

I'm not new to writing, but I'm a newcomer to anything remotely related to coding. As such, and after writing half of my text game in the common way, I find myself getting into some technical difficulties trying to transcrypt it into the real thing. I'll explain myself with the following example:

You find yourself lying on the stone floor of what appears to be a cell. You can't identify the source of the dim, red light that makes your shadow flicker and your spine chill. It's nevertheless better than absolute darkness. The air is stagnant and cold. At first glance, there's nothing here besides the door in front of you, and an small hole on its lower part. Just enough to squeeze through.
What do you do?

[[Search the room]](d agger)
[[Get through the hole]](l eavefirst)

There is a dagger sticking from a crack in the wall just behind you. You can't find anything else, so you decide to get through the hole.
Something is not right here. You decide that you will not stay here any longer.

Now, there would be some common text ahead from here, but we would get to a point where the game should know whether you possess the item or not. From what I've read in the documentation I think I should use that value known as "boolean", but I have no idea about how to implement it.
Should the "[[dagger]]" part start its text with the line "@set dagger? If this is the case, then the "[[leavefirst]]" would need a "@unset dagger"?

But that is not all. How do I make this follow the subsequent options? Should I start the related sections with something like "if @dagger = true then show this text. If dagger = false show another".

I know this is pretty basic, but I'm extremely noob. Also, english is not my first language, so forgive any confusions this fact may lead to.

Okay, a little lecture here - booleans are variables that are either true or false. You set them and unset them like this.

@set myFlag
@set not myFlag

To use them in some sort of code (where things come up if they are true or false) it works like this.

The wizard looks at you, judging it you are worthy.
{if worthyFlg: Yes, you are worthy.}
{else: Get out of here, you poser!}

Hope that helps!

Log in to post a reply.