Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

How to set Item Number to Variable?

Greetings everyone.
Small problem that seems like it should have a simple answer, but I am stumped.
I need to set Item number Equal to Variable.
The engine only allows increase and decrease by variable.
How would I set the item number equal to the variable?

Thank you in advance for taking the time to read and help me.
 

Xilefian

Adventurer
Xy$
0.00
Remove all the items from the player (decrease by maximum number, 9999) then increase by the variable.

Extra (more advanced thinking): In-case the maximum number (9999) isn't enough, you could add a loop that checks if the player still has the item and keep removing the maximum amount until they're all gone, then increase by the variable.

It's not a clean, pretty way to do it. The cleanest way would be a Javascript snippet, but that is a lot more complicated.
 
Top