About Store Forum Documentation Contact



Post Reply 
Gui text variable
Author Message
zarmen98 Offline
Member

Post: #1
Gui text variable
[Image: 290482764c4916b5394096f59d7467010fb06f6f...2dccba.jpg]

i created a gui and put a text.
I give that text a name = healthVal

when im pressing V i wanna make it +=1000
how can i use healthVal like a variable?
i tried

playerstatus.healthVal but its wrong usage idk how to change it sorry im new
grin
06-01-2019 01:40 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Gui text variable
you should operate on int/flt player.health variables, and then always set the gui text from that value.
gui_text.set(player.health);
06-02-2019 03:55 AM
Find all posts by this user Quote this message in a reply
zarmen98 Offline
Member

Post: #3
RE: Gui text variable
i know thats but whats this "gui_text"
i can't reach that.

i tried to reach healthVal.set but healthVal is not defined.
how can i reach that?
(This post was last modified: 06-05-2019 04:56 PM by zarmen98.)
06-05-2019 02:17 PM
Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Member

Post: #4
RE: Gui text variable
You have to get your gui that inherit guiobjs then get your txt guiobj
Normaly when i create a ui i keep a * to this txt gui obj to be able to change it without going back and getting it again
Theres example how to write this in the tutorial on gui smile
(This post was last modified: 06-05-2019 05:28 PM by RedcrowProd.)
06-05-2019 05:23 PM
Find all posts by this user Quote this message in a reply
Post Reply