Game Development Community

Static Shapes/Shapes Problem

by KQswst104 · in Torque Game Engine · 06/01/2009 (7:35 pm) · 4 replies

How can I make a dts file come up in the static and not static shapes category in the Mission Editor? I've checked, made sure its in the data/shapes category, and no matter what the dts file pops up only in the static shapes file, and its a health pack so I need to be able to interact with it through scripting.

#1
06/01/2009 (7:56 pm)
http://www.codesampler.com/torque.htm
#2
06/01/2009 (10:36 pm)
In the mission editor, you can only either view the dts static shape file, or spawn a static shape object by creating a static shape datablock. if you make a datablock, hopefully it'll show up in the directory :)
#3
06/02/2009 (5:43 am)
The gettingStarted.pdf tutorial explains it. You can find it in C:YOUR_TGE_DIRECTORYexampleGettingStarted.pdf

Update: Look in Server/logoItem.cs

//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------

datablock StaticShapeData(TorqueLogoItem)
{
category = "Items";
shapeFile = "~/data/shapes/3dtorquelogo/torque_logo.dts";
};


If you still have trouble let us know. We'll keep helping.

Tony
#4
06/02/2009 (9:22 am)
You have the SDK, so you should be able to just find the existing HealthKit datablock in the Demo or especially the starter.fps. Just copy that for use in your project, and read over the script functions to get an understanding of how the kits work (a keypress) as opposed to the healthpatches (onCollision).

The thing to remember is that objects that show up as "Shapes" are scripted object that have an associated datablock. It's the category field in the datablock that determines where in the Shapes list you will find your object, and without the datablock you wont be able to find it because it won't be added to the list.