Game Development Community

Referencing to client / shapebase

by Tim Heldna · in Torque Game Engine · 03/11/2006 (9:43 am) · 2 replies

When a player joins a game they are issued with a unique client number(id) and a unique shapebase number(id). The client id can be found by hitting F8, then F11, selecting the player object and finding the 'client' field in the mission editor properties (F3) which will have a 4 digit number in it. The shapebase id appears when you hit F11 and look at the player object, a four digit number will be displayed near / on the movement arrows of the object.

I can obtain the client id from script without any problems but am having trouble getting the shapebase id. One reason I need this ability is for the setting and image state manually resource

The command I'm trying to use is
%shape.manualSetImageState(%slot, %imageState);

Where:
%shape = the ShapeBase that's holding the iamge you want to change States on
%slot = the image slot that you want to be changing States on
%imageState = the name of the image state you want to switch to

So how do I determine the shapebase from script? Any help or kick in the right direction is always appreciated.

#1
03/11/2006 (10:09 am)
The shapebase is stored as %client.player, where %client is your ServerConnection id (what you refer to as your unique client number.

Another way to find it is to look at where the player is spawned (in I believe server/scripts/game.cs, may not be true in 1.4, I haven't worked with it yet) and store it in a global variable of your choosing.

Ian
www.mode7games.com
#2
03/11/2006 (10:17 am)
That's what I needed to know, got it working no problem. Thanks for the quick reply!