Game Development Community

Where RTSUnits defined in example?

by Rutger Van Dijk · in Torque Game Engine · 06/03/2005 (9:46 am) · 3 replies

Hi,

Just bought the engine with the RTS Starter Kit. I'm learning slowly, doing tutorials etc. I opened the demo mission in the mission editor and tried to add a cube made in maya and exported to DTS act like one of the 3 basic units. Or add another basic unit for that matter, but all i seem possible to add are static shapes, after some searching I just don't seem to find how to do this. Moreover; where, in what code or file, are the basic 15 units added to the mission world??

Eager to find out :)
Cheers,
Rutger :)

#1
06/03/2005 (11:09 am)
The units are generated as part of the server side connection handling code: /server/scripts/gameConnection.cs--RTSConnection::onClientEnterGame(). That function sets up a double for loop to give the nice spacing, and calls createPlayer() with the transform (location), and index (which type of unit) for each iteration of the loop.

PS: There is an RTS-SK private forum that you should subscribe to (use the "Edit Subscriptions" link to the left), which has a great set of threads discussing this exact topic, as well as many others specific to the RTS-SK.
#2
06/03/2005 (11:17 am)
Ha! - i had just found the createPlayer function, was searching like a madman where it was called! but i see it now! cheers m8 - thx for the private forum tip - i'll go 'n subscribe :)
#3
06/04/2005 (2:59 pm)
Ha! - i had just found the createPlayer function, was searching like a madman where it was called! but i see it now! cheers m8 - thx for the private forum tip - i'll go 'n subscribe :)