Game Development Community

Buy system?

by Leo "kingDUCTtape" Altmann · in Torque Game Engine · 11/02/2005 (10:15 pm) · 1 replies

Hello,
I was wondering if anyone had an example of an implementation of an item purchasing system into Torque. The system I'm imagining is one where a player has an amount of money (assuming just adding a money variable to the player datablock), gets $100 or so for every frag, and can push a button to access the buy menu at any time to buy better guns. I'd imagine it'd be fairly simple: GUI window with buttons for the weapons, which run little scripts to increase the inventory and decrease the money, if the player has enough in the first place. I'm anticipating my main hangup to be with making the GUI and linking the buttons to the scripts. So, if anyone has seen any examples of this, it'd be greatly appreciated!

Thanks,
--Leo A.

#1
11/02/2005 (11:02 pm)
I am making this exact thing for my game......I think for you learning the GUI part and the script part is going to be the easiest. Just make sure your money system is stored on the server to help with cheating. I placed my in the GameConnection Object since if you put it in player it will get reset everytime they die and respawn.