WatchNon-threaded

Forums » Advanced Editor Forum » Read Thread

Talk about it. Ask for help on it. Compliment it.

How do I make a variable decrease?

10 years ago

The subject says it all

How do I make a variable decrease?

10 years ago

Do you have scripting enabled? Well, the best way to solve this is with that, but it can be done without it. I assume you have created the variable, right? Well, on a page, the links shown below have various different icons in front of them (a stopsign, an inventory bag, a plus and more), you should learn what each of these does, as it causes either changes to things like variables and items, or causes the link to be restricted (such as if the variable MRBLAHBLAH is 0, and not 1, you cannot use the link "Talk to Mr. Blahblah", because the fact that the variable representing him is 0 represents the fact that you haven't got him with you). Anyway, one of the icons in front of each link is a plus, select that to determine changes in variables when the particular link is clicked.

If you have scripting (remember that the icon ":=" represents scripting) enabled, then you can either open the script for that individual page (by clicking the before-mentioned icon on that page, opening a new window where you can type scripting in for that page) and have the variable change there, then the link clicked does not matter for this, because the variable changes nontheless. If you click that same icon, but this time at a link (one of the icons that appear before a link on all pages), you can do the same thing. In order to have the variable decrease using this, you must type:

%VARIABLE := %VARIABLE - 1

Into the scripting browser that appears.

How do I make a variable decrease?

10 years ago
T.T All grown up :)

What SindriV suggested should work quite well.

How do I make a variable decrease?

10 years ago

I think it should be a ritual that Ziki and Sindri need to help all people learning to script at least once lol.

How do I make a variable decrease?

10 years ago
It may very well be :P

How do I make a variable decrease?

10 years ago
Oh, but you can't forget October and JJJ!

How do I make a variable decrease?

10 years ago

Agh, I forgot! I don't think I've gotten scripting help from 3J yet, for the most part its you, Sindri, and that one big one from October.

How do I make a variable decrease?

10 years ago
Well, it was JJJ and October that used to answer my scripting questions. So they're usually the forefront in my mind about questions.

How do I make a variable decrease?

10 years ago

I'd say Sindri helped me the most, and that's who I automatically think of.

How do I make a variable decrease?

10 years ago

Well, Zikara passed her knowledge onto me...well...some of it anyway.

How do I make a variable decrease?

10 years ago

And so it shall be untill the end of time... or at least when we can physically enter the internet.

How do I make a variable decrease?

10 years ago
Hopefully, I can finish up the scripting tutorial I have in mind (or even start working on it...)

How do I make a variable decrease?

10 years ago

Thank you so much!

How do I make a variable decrease?

10 years ago
Nice response Sindriv