Game Development Community

Loading DTS into Gui TsCtrl

by Steve Tungate · in Torque Game Builder · 02/07/2007 (10:44 pm) · 2 replies

Hello. I am working on a Starsiege mod. I would like to have a window in the gui that would load the .dts models in the Shapes/Player folder. I've been looking around for tutorials but so far have came up empty handed. Basically I would like it so when you click on a bitmap of said "herc" the dts will appear in a tsctrl window of some sort...then you can select a weapon model and the weapon will appear on the model in the window. Any help on this would be greatly appreciated. Thanks.

#1
02/26/2007 (5:09 pm)
Ok i figured out how to load a object in a objectview window. What i really need help with now is spawning what i have loaded in said window into the game. I am sure i'll have to do a commandtoserver with what i have selected. I debating on how to do that.. maybe a writetofile type deal where when you select a weapon like "elf" and load it on mount 1 on the herc it will write to a file that that particuar weapon will be on that veh...then when you spawn the file will initate the right things. Or I belive the commandtoserver will work. as you pick whatever weapon you want you can do a commandtoserver in the gui command box and it will tell the server that your vehicle is using a certain weapon on a certain mount. For example the Maverick has 6 weapon mounts:
http://img02.picoodle.com/img/img02/7/2/18/f_Maverick2m_f607f7a.jpg
so for mount1 i could use on the GUI button:
hercwindow.mountObject("emp", "fps/data/shapes/emp/emp.dts", "", "maverick", "mount1", "");
hercwindow is the name of the window the shape appears in (maverick) so you will actually see the weapon appear on the maverick in the window on the mount specified. What I need help with is getting that Vehicle to spawn with what weapons i selected in the gui... PLEASE HELP.. this is really holding us back on our project.
#2
02/27/2007 (3:27 pm)
Not sure if you have access, but here is a link to a dts gui viewer class. I've never used it so good luck:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3659

If you cant get it working, you should think about the problem a different way. Maybe render screenshots of your models and use png images instead of a 3d models. At least it would be a working solution until you figure it out.