Game Development Community

Creating a pickup item

by tODD k. · in Torque Game Engine · 08/22/2008 (8:06 pm) · 4 replies

I'm trying to create a pickup item (like the healthKit), but I'm having problems getting it to show up in the "Shapes" directory.

I've created a .dsq & .dts file and moved them to a created folder:
example\starter.fps\data\shapes\pickups

I've also duplicated health.cs found in example\starter.fps\server\scripts
renamed it to pickups.cs and edited it to use my .dts:

datablock ItemData(myPickup)
{
   // Mission editor category, this datablock will show up in the
   // specified category under the "shapes" root category.
   category = "Pickups";

   // Basic Item properties
   shapeFile = "~/data/shapes/pickups/pickup_wpn_axe.dts";
   mass = 1;
   friction = 1;
   elasticity = 0.3;
   emap = true;

   // Dynamic properties defined by the scripts
   pickupName = "my test pickup";
   repairAmount = 50;
};

Lastly, I've added this line to server/scripts/game.cs
exec("./pickups.cs");

Am I missing anything? Much thanks!

#1
08/23/2008 (2:19 pm)
Are you getting any errors in the console? Is this a brand new game folder or are you doing this in the fps starter kit?
#2
08/24/2008 (10:15 am)
I am working in the FPS Starter kit folder & how do I check the console for errors?
#3
08/24/2008 (11:04 am)
You have the console file in the example folder.
I believe its called console.log


You can check while editing your game by using the tilde key (~)
#4
08/24/2008 (5:02 pm)
Thanks, it was a script error found in the console. It shows up now. :)