Game Development Community

Gui Displaying Stats and Other Questions

by Brian Moellers · in Torque Game Engine · 09/09/2001 (7:02 pm) · 3 replies

Hey all,

I pretty new with the scripting for V12 so I am having so trouble getting something that should be pretty easy figured out and implemented. Plus I have a few other questions that maybe could also be answered

I am creating a fantasy style RPG which will have real time combat. However each player shall have stats that are associated with them such as strength. Right now I struggling get a GuiTextCtrl that will display the stats that I have added to the player. Everything seems to be okay with the actual GUI screen, but I cannot for the life of me duplicate the way that the other GUI features use to make dynamic text...

My other questions are questions about what was implemented in v12 scripts and what I want to be able to do. I have a working text based combat engine that I have configured to represent the melee combat system I want to use in combat for my game. Since in the RPG sytem I don't want to cause the user to continually bang on the mouse key (I don't want to get sued for causing carpal tunnel syndrome in those who chose to play the game), so I implemented a global list of "Creatures(players)" in combat where each player keeps a list of it's own enemies. Therefore I can deal out damage and attacks based on the clock ticks and other combat details.

However I am wondering a) if there is a good place to implement a global list of combat, b) what is the preferred data structure (although I want to do this in the code so that it is inherent in any mods that are released as well), and c) can I place this list on the server (and in the code) and still access it... or any other details that might come up with this scheme. I have been trying to figure out the team based code in the scripts and engine, because this could be a good basis for other things like adding allies or party members. Also I thought that the antithesis of a team list would be a enemies list... Makes sense to me...

Have ideas or directions, I could use the boost and help.

Thanks in advance and happy programming...

Brian

About the author

Recent Threads


#1
09/09/2001 (10:12 pm)
I'm not too sure what the question is on the HUD, but as to the question about what kind of datastructure to use, how are you going to be using this list? If you are going to always be stepping through it sequentially, use a linked list. Otherwise I'd use a hashtable. Two reasons, one is I like hashtables, the other is that it's very silly to have to walk through a whole list if you don't need to. On the other hand, it's silly to use a hashtable if you are just stepping through the list all the time.
#2
01/11/2002 (9:17 am)
I suggest you read the Numeric Health Indicator tutorial (look under Code Snipits on the left)
it'll help you with the first question.
also read the Ammo Display HUD tutorial... both very good