From what I see in what you shared, you don’t have a choice whether they spend diamond or not. You assumed that if diamond then you have action; if no diamond, you have another action, but there is no choice for a reader.
So let’s start with that, so we can continue later with outcomes.
- choice for a reader
if (diamond){
NARR
I can give you the information you need, but it’ll cost ya.
choice
“Sure, I’d like to exchange a diamond!” {
MC
Sure, here you go.
gain exchange_diamond
#here probably the information you want to share with them
}
“No, I want to keep the diamond.” {
MC
I don’t need information.
keep_diamond
}
}
else {
#when you have no_diamond
MC
Sorry; I don’t have anything to spare.
}
Unfortunately, you need to have another gain(s) to make the outcomes possible and not have any errors, because those who will have the diamond from earlier and spend it still have a gain. Like you noticed, you can’t erase that, so you need to have something for those who will exchange and keep the diamond.
- Based on that, you have a second scenario, if it’s not a choice, but only an outcome, that would be like this:
PERSON
I’ll let you lodge at my place for a diamond.
if (keep_diamond){
MC
Sure. Here ya go.
}
else {
MC
Sorry, I have nothing to spare.
}
no_diamond in this scenario will be for those who didn’t have them from beginning
diamond is for the first choice
keep_diamond will be for next outcome the gain you can use to make the if/elif/else
exchange_diamond can be useful later for something else or another interaction (for example: sorry, I spent it later on something; or to describe why you don’t have any diamond with you.)
- There is a possibility for only gains diamond and no_diamond, but it can be tricky and not always so clear if you have a lot of coding. You would have to see if it works, because I’m doing it raw, so I’m not sure if it will work when you run it in the portal.
if (diamond){
NARR
I can give you the information you need, but it’ll cost ya.
choice
“Sure, I’d like to exchange a diamond!” {
MC
Sure, here you go.
gain no_diamond
#here probably the information you want to share with them
}
“No, I want to keep the diamond.” {
MC
I don’t need information.
}
}
else {
#when you have no_diamond
MC
Sorry; I don’t have anything to spare.
}
#another exchange scenario outcome
PERSON
I’ll let you lodge at my place for a diamond.
if ([diamond] AND [no_diamond]){
MC
Sorry, I have nothing to spare.
}
elif (no_diamond) {
MC
Sorry, I have nothing to spare.
}
else {
#this is outcome for those who has only diamond gain and they didn’t exchange it earlier.
MC.
Sure, here you go.
}
or
PERSON
I’ll let you lodge at my place for a diamond.
if (diamond){
if (no_diamond) {
MC
Sorry, I have nothing to spare.
}
else {
#this is outcome for those who has only diamond gain and they didn’t exchange it
MC.
Sure, here you go.
}
}
else {
MC
Sorry, I have nothing to spare.
}
Hope it will help. As you can see, you can do it in easy or complicated ways, but I suggest doing it easier if you can. If you have any other questions, or something is not clear, let me know ;3