Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Variable Question

11 years ago
So say I have a game where you have different characters and you have variables to say like how your relationship is. If it is 0, you hate each other. If it is 1 to 20, you don't really like each other but you can stand each other, if it is 21 to 40, you are ok with each other, if it is 41 to 70, you like each other, and if it is above 70, your best buddies. How do I get it so the text will change depending on the relationship variable?

Variable Question

11 years ago

Hm....

Theres a thread on this somewhere or an article...

Try hunting through the help and info area.

Variable Question

11 years ago
This article is likely to help, although if you can't find what you're looking for you can go here and scroll down through scripting and advanced editor articles.

Variable Question

11 years ago

Where do you want the text to be?

This seems like what you want though. Replace VARIABLE with the name of your variable:

%%VARIABLE%=%0%You hate them%%%%VARIABLE%<%21%You can just barely stand them%%%%VARIABLE%<%41%You are okay with each other%%%%%VARIABLE%<%71%You like each other%%%%VARIABLE%>%70%You are best buds%%

Maybe. I'm actually not sure if this runs as an if-else chain or just a chain of ifs...

Variable Question

11 years ago

Unfortunately, using ranges with %% requires plotting out every number between the first < and the last >...

Variable Question

11 years ago

Alright, so it's just a chain of ifs then. Shame.