Help With Variables

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
AzureGames
Red Slime
Posts: 49
Joined: Thu Oct 29, 2015 8:18 pm

Help With Variables

Post by AzureGames »

In text boxes, what's the command for variables? I want it to show a specific number depending on what number a certain variable is. To put it another way, how do I get to show the number of a certain variable in a text box?


:???:



(PS:I sincerely apologize if you have no idea what I'm talking about.)
User avatar
kylekrack
Liquid Metal Slime
Posts: 1243
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

I'll try to help you out!

So when you're editing a text box, it brings up a run-down of various codes you can type in the textbox to represent different values. To represent a variable's value, you're going to want to type "${V#}" where # is the global variable ID number. This means in the .hss file for your game, there should be a line saying "global variable(#, name)" to name that variable. Then later on in the .hss file, that variable needs to be set to some value (eg. "name := party money" will store the money you have in variable "name").

Does that answer the problem or is there something else you need troubleshooting with?
Attachments
These codes here
These codes here
Screen Shot 2017-12-18 at 12.16.09 PM.png (28.79 KiB) Viewed 535 times
My pronouns are they/them
Ps. I love my wife
AzureGames
Red Slime
Posts: 49
Joined: Thu Oct 29, 2015 8:18 pm

Thank you!

Post by AzureGames »

Thanks a ton, dude!
Post Reply