Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

How do I make an item add something to a variable?

8 days ago

For instance, I have a variable of energy, and I want a food item to add a certain number to that when consumed (used). I tried clicking on the links about items and variables in help and info, but both links are broken (at least for me).

Thanks!

How do I make an item add something to a variable?

8 days ago
Does this help?

How do I make an item add something to a variable?

8 days ago

I think it does, thank you. Very much appreciated!

How do I make an item add something to a variable?

8 days ago

I haven't messed with this stuff in a while, but one thing you might want to try is have a page you go to when you eat, and then put in the item the script to increase your energy variable.

item-stuff

The "item effect" thing is to take you to a page, and when it does that, it will run the item script. Unless I'm misremembering how this all works, of course.

How do I make an item add something to a variable?

8 days ago

Thank you!

I'll probably have to play around with things a bit, as my knowledge of scripting is basically nonexistent, but that definitely helps too.

How do I make an item add something to a variable?

8 days ago

Don't forget to store the page you are on so you can use $DEST to get back there after the item is used, presuming you would want to go back to that spot.

 

How do I make an item add something to a variable?

8 days ago
Could a "go back" button work without resetting the variable change?

How do I make an item add something to a variable?

8 days ago

Haven't tried it, so I don't know, but it might.