Game Development Community

Default Inventory System?

by Infinitum3D · in Torque Game Engine · 12/19/2006 (10:38 am) · 1 replies

I've heard there is a "default inventory system" built into Torque1.5

If this is correct, are there any resources on how to work with this? I mean, for a total newbie? I know Realm Wars has an inventory system, and I've tried Tim Newell's inventory resource, but if there's a built in system, that would work well for a beginner.

thanks!

Tony

#1
12/19/2006 (1:15 pm)
If you go to example\starter.fps\server\scripts\game.cs, you'll see an example of how the default inventory is used.

Find this: function GameConnection::createPlayer(%this, %spawnPoint)

In this function you'll find the following calls:
// Starting equipment
%player.setInventory(Crossbow,1);                // Give the player 1 crossbow
%player.setInventory(CrossbowAmmo,10);    // Give the player 10 crossbowAmmo
%player.mountImage(CrossbowImage,0);     // Set the starting weapon image as the crossbow

You can find the full inventory system in example\starter.fps\server\scripts\inventory.cs