Updating game content for a player
by Keith Mc Dowell JR · in Torque Game Builder · 12/14/2007 (12:44 pm) · 1 replies
Hello,
Has anyone came across or has attempted to update text information with some of the gui tools. The plan idea is: When you the user creates a new player they are given 20 points to distrubute between six atrributes. The Player will be able to roll dice to generate base stats, but can adjust the stats from the 20 points.
Strength [ - ] 12 [+ ]
Intelligence [ - ] [+]
Charisma
Endurance
Luck
Where the [-] and [+] represent the adding and subtracting; coding the -, and + seems to be the easy part, but what guibitmap field would work best to update the numbers on the screen?
Has anyone came across or has attempted to update text information with some of the gui tools. The plan idea is: When you the user creates a new player they are given 20 points to distrubute between six atrributes. The Player will be able to roll dice to generate base stats, but can adjust the stats from the 20 points.
Strength [ - ] 12 [+ ]
Intelligence [ - ] [+]
Charisma
Endurance
Luck
Where the [-] and [+] represent the adding and subtracting; coding the -, and + seems to be the easy part, but what guibitmap field would work best to update the numbers on the screen?
Torque Owner Steven Meek
Then in the [ - ] for example, put the Command as guicode.minusStrength(); replace guicode with the class you defined of your top level gui element for that specific gui.
Then in the scripting files put:
function guicode::minusStrength()
{
guiStrength.setValue(guiStrength.getValue() - 1);
}
Rinse and repeat for each button and stat.....