Game Development Community

Some (basic?) TorqueScript questions

by Ron Barbosa · in Torque Game Engine Advanced · 05/04/2010 (8:04 am) · 2 replies

OK...let me preface this by saying...I understand this might not be as simple as I think.

I have an animated 3D character model loaded in TGEA (I believe it's animated on the Torque Orc skeleton). I also have a DTS file of a weapon.

Is there a quick and dirty way for me to just raise the Torque console, and manually enter a few commands to load that DTS weapon and position it at the model's position?

This is not a big deal to me...it's something I am doing in parallel to my current major game project. If this is going to take more than a couple hours to accomplish...it's not important enough for me to divert my attention from my "real" project.

Thanks!
--RB

#1
05/04/2010 (10:25 am)
To mount a weapon to a player model, and assuming you have the relevant datablock:

playerObjectID.mountImage(weaponImage, 0);

weaponImage = name of the weapon image datablock
0 = mount point on model upon which weapon is placed
#2
05/04/2010 (11:55 am)
@Michael, thanks for the response. It's been a long time since I did anything TorqueScript.

I think I may not be asking the right questions. I guess what I'd like to do is:

1. Load the world and 3D model.
2. Bring up the console
3. Type some command in to the console that will load the weapon DTS file
4. (I think) load some TorqueScript file that defines the weapon's datablock.
5. Mount the weapon as indicated in Michael's response.

It may take longer than I'm willing to spare at this time. I may have to dig up my old copy of 3DGPAI1 and see how I can do all of this.

Thanks again!
--RB