Tara explains: Ifs, elses, gains, labels, gotos and the points system!

Check out: The Points System

You can make them either lose or gain points (-1, 1, etc.) by writing something like:

@MC +1
For when a positive choice is selected.

or:
@MC -1
For when a negative choice is chosen.

Or you can even create two new characters and name then anything like GOOD, BAD and make a point systems category based on that. So, if they do bad actions, they gain BAD points, if they do good actions, they gain GOOD points.

Hope it makes sense what I’m trying to say ^^

2 Likes

Hmm…I see. It does make a lot of sense actually, I think I understand it now. :blush:
I will just have to associate the good/bad points with two other characters in my story. That souds easier to me than constantly adding and subtracting points, I was never good at math. :sweat_smile:

Anyway, thank you so much for your explanation! :smiling_face_with_three_hearts:

2 Likes

Bump ^^

1 Like

I’m about to use this and no error has popped up in the script but I just want to check,

Does this actually work :slight_smile:

1 Like

I’m having problems with my script so when l preview it it’s not going forward l added a remembering choice with this if(date_with_character){ and now it’s not going forward after l put that in my script if anyone knows what to do l would love for you to help me💗

1 Like

Did everything get solved?

2 Likes

yes thank you! :blush:

1 Like

Would it be possible to code something like this? Where one choice results in a character gaining two different things and a point? Thanks in advance!

1 Like

you can, but you can’t bring them up together (in if/elif/else)

1 Like

So we can’t combine a gain and a point?

1 Like

You can but coding for it (for if/elif/else later) needs to be nested

1 Like

Nested? Sorry but I’m new to all this

1 Like

Read this thread :slight_smile:
HOW TO: Nested Choices

1 Like

Alright, thanks so much :pray:t2::pray:t2:

2 Likes

Hi there! To do that, you’d need to do an if/else, so that if a character has enough points, then they unlock the choice. So let’s say you’d been adding points to the character YOU.

NARR
Let’s see if you have enough points!

choice
“Check points!”{

continue

}

if (YOU>3){

goto choice_all

}else{

goto choice_normal

}

label choice_all

NARR
Here are your options:

#do a choice with all the options

label choice_normal

NARR
Here are your options:

#do a choice without the extra choice - or show the extra choice but make it a locked choice box.

There are other ways of doing it (that are probably quicker) but that’s the way I’d go. Hope this helps!

1 Like

I agree with what @JemU776 says - I’d make two characters, have them offstage, and add points to those characters instead of the MC. This is a great method if you’re having lots of points systems e.g. relationship points and quiz points, for example.

2 Likes

I’ve used points, gains, if/elses, labels and gotos before in my published stories and I can confirm they work! It takes some time to learn and it is easy to make mistakes, so you need to thoroughly test everything, but I’m fairly sure that the coding itself/these donacode features are real and work!

But, the best way is to test everything, particularly when using advanced coding features. Good luck with your story!

1 Like

I have used it and It did work really well in the end! Thanks :slight_smile:

1 Like

No problem! I’m glad it all worked for you. Let me know if you ever have any issues with points in the future and I’ll be happy to help!

1 Like

Can you reference a gain on multiple occasions?

1 Like