Author Topic: How do i display variables in a GUI?  (Read 607 times)

I figured this actually belongs in help.

So i'm making a GUI for my RPG.

There will be a keybind that opens the GUI.

How do i display the variable number in the GUI?  (Ex variable "slaps" on client)

How would i get that number to show in the GUI? (Like when i do <var:cl:slaps> in print events)

Please include pics cuz they r halpful   :cookieMonster:

This should probably go in Coding Help, you're more likely to get helped with this in there.

This should probably go in Coding Help, you're more likely to get helped with this in there.
I figured it would go here, but i don't think i would get any replies over there anyways.

I figured it would go here, but i don't think i would get any replies over there anyways.
You would get more help.

This pertains to coding, and thus, it belongs in the section where you get help for coding.

Get it?

I just want to make sure you understand that this requires coding, because this:
Please include pics cuz they r halpful   :cookieMonster:
Implies otherwise.

You would get more help.

This pertains to coding, and thus, it belongs in the section where you get help for coding.

I just want to make sure you understand that this requires coding, because this implies otherwise.
Guess your right about getting more help.

And yes i know how to use vce extremely well and make basic GUIs and edit code a little. I'm just not a serious person  :cookieMonster:

But i was only trying to be funny and you shattered my hopes :'c

Easy. Displaying variables in VCE is not really like displaying variables in code.

Code: [Select]
%a = 4;
commandToServer('messageSent',"The variable I said was "@%a@"");
would make your player say "The variable I said was 4". So just basically to seperate strings from a variable in code, use "@ and @". Like parenthesies. This can be done in any message-viewing code such as

bottomPrint();
Announce();
centerPrintAll();
.etc

So... say i added @%a@ in a textbox in the GUI. Would that makes the number for "a" show up there ingame?

Like ingame i use vce to set variable "a" to 4 (on client)
then set it to 7 (on player this time)

Would it show the variable from client or player?

Ok, maybe i didn't explain things good enough. Here what i need.

I click a brick and it gives me 10 wood. I do CTRL+Q and my GUI opens up. The number of wood i just got is displayed on the side in the GUI.  That's my problem. How would i get the amount of wood i have displayed in the GUI like that?

Destiny/z0w0 did this in the DRPG i believe

The number of wood have is displayed on the side in the GUI. 

Sorry for double post, no edit button.

o dear, um i'm not entirely sure on how to retrieve variables from VCE, so in the meantime you should just make a brick with a code in it that says
Code: [Select]
$a = 4;

then in your GUI, in the textbox that shows the variable, put in $a