Teams
by Mattinn · in RTS Starter Kit · 07/29/2005 (10:41 am) · 5 replies
Right now im working on implementing different teams, as a beginner this is the first time i've made anything from scratch in torque. So bear with me here!. My basic idea right now of course is to build the teams on Steven Zepp's building/resources resource, so what i did is i maid a simple Teams.cs file that has several functions that tell torq there is something called "Teams" so the idea is to make the Teams.cs file load up 4 different buildings.cs files (one for each team) and each of them have different buildings, that way i only have to tell the buildings what team they belong to (else i would have had to tell each unit what team they belong to also). When i finished this i got to the part where i had to make a Gui file where i could choose from different teams. then i have to make the player begin with a spesific "Peon" unit that belongs to that team so i can start building buildings that belong to that team. right now i am stuck on the part where i am doing the gui which tells the server what unit a player starts with. I wanted to know if anyone has any better ideas on a easy way to make teams or if anyone has any notes on what files/resources i could look at next to keep me going on the Gui/server part. any anwsers and/or remarks would be greatly appreaceated. thanks
-mattinn
-mattinn
#2
-mattinn
07/30/2005 (6:21 am)
I have another question. When i make 4 different building.cs files ill have to make 4 different building.cs files on the server side and the client side, right? i havent done that yet, ive only done this on the server side, but if i have to do this what would i do to bind the building.cs files on the client side so it would all add up fine? or should i maybe just make 1 building.cs file on each side with all the buildings for each and every team? well by now im going in circles :). As i say my programming skills arent the best ;). But hey, thanks for the quick reply -mattinn
#3
In other words, separate the functionality of the buildings from the instantiation of the buildings. This is what the mission (.mis) file does--the information stored in the mission file is specific to what is actually instantiated in the game world during startup. You will want to provide unique names for these buildings of course, since their objectID's are not persistent from one start to the next, and keep track of those names in the code that assigns the teams for each of the buildings during loadup.
07/30/2005 (7:47 am)
You most probably don't want to be setting up your "startup" buildings in building.cs--it's not what it's designed for. What you want to do is to set the various values for the building types that are possible in both building.cs and buildings.cs (client side and server side), and then have a separate file, named however you like, that contains the information about specifically instantiated buildings that have been defined in the building.cs.In other words, separate the functionality of the buildings from the instantiation of the buildings. This is what the mission (.mis) file does--the information stored in the mission file is specific to what is actually instantiated in the game world during startup. You will want to provide unique names for these buildings of course, since their objectID's are not persistent from one start to the next, and keep track of those names in the code that assigns the teams for each of the buildings during loadup.
#4
-mattinn
07/30/2005 (9:43 am)
Well im getting constant errors and stuff. If you have the time i might send you what ive done so far, that way youll know my position right now or i might send you the console log. Anyways, it just doesnt work and ill have to be a little bit more patient to finish this, and if i do ill hopefully be able to make a resource out of this. -mattinn
#5
07/31/2005 (10:02 am)
Anyways im going to Denmark tomorrow and i wont be back untill next friday so i dont expect i will be posting utill ill be back, so no progress meanwhile.
Torque 3D Owner Stephen Zepp