Game Development Community

Not all mission objects are sent to a networked client?

by Juan Aramburu · in Torque Game Engine · 04/17/2006 (9:42 pm) · 3 replies

I've worked off of the FPS Starter kit and added some stuff to it. However, one problem I'm having is that clients that are networked do not get all the objects of the mission.

In the mission, I have a SimGroup(named PlayerDropPoints) with various SpawnSpheres. On the client side, I have a dialog that comes up where you select where you want to spawn from (you start out unspawned). In the onWake() of the dialog, I iterate the PlayerDropPoints members and display the choices of SpawnSpheres. The problem is that nameToID("MissionGroup/PlayerDropPoints") returns -1.

I don't have this problem when the server & client are on the same machine. The file with this code is called from ~/client/init.cs. What could be the problem?

#1
04/17/2006 (9:59 pm)
You need to use Client Commands to send this data to the client. Make a clientCmd function in your client scripts and send the necessary data down with a CommandToClient call.
#2
04/17/2006 (10:48 pm)
Why would it not send these spawn points though? It sent the TSStatics, terrain & textures over etc...

So during phase1, I send some clientCmds? How do I send actual data? Remember this is the 'getting started' section!

This is how the objects are in the mission file:

new SimGroup(controlPoints) {

      new Trigger(ControlA) {
         position = "-51.0652 -44.8402 174.225";
         rotation = "1 0 0 0";
         scale = "50 50 50";
         dataBlock = "ControlPointTrigger";
         polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000";
            onGroup = "Default Value";
            owner = "0";
            ownerName = "Neutral";
            initializedYet = "0";
            value = "15";
            capturable = "1";
            pointID = "1";
      };
      new Trigger(ControlB) {
         position = "101.063 -70.1354 185.621";
         rotation = "1 0 0 0";
         scale = "50 50 10";
         dataBlock = "ControlPointTrigger";
         polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000";
            onGroup = "Default Value";
            owner = "0";
            ownerName = "Neutral";
            initializedYet = "0";
            value = "15";
            capturable = "1";
            pointID = "2";
      };
      new Trigger(ControlC) {
         position = "368.463 -55.7354 221.021";
         rotation = "1 0 0 0";
         scale = "50 50 10";
         dataBlock = "ControlPointTrigger";
         polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000";
            onGroup = "Default Value";
            owner = "1";
            ownerName = "Red";
            initializedYet = "0";
            value = "15";
            capturable = "0";
            pointID = "3";
      };
      new Trigger(ControlD) {
         position = "-123.435 57.9118 210.821";
         rotation = "1 0 0 0";
         scale = "50 50 10";
         dataBlock = "ControlPointTrigger";
         polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000";
            onGroup = "Default Value";
            owner = "2";
            ownerName = "Blue";
            initializedYet = "0";
            value = "15";
            capturable = "0";
            pointID = "4";
      };
   };
   new SimGroup(PlayerDropPoints) {

      new SpawnSphere(SpawnA) {
         position = "-13.2061 -124.31 205.215";
         rotation = "0 0 1 7.26648";
         scale = "0.940827 1.97505 1";
         dataBlock = "SpawnSphereMarker";
         radius = "10";
         sphereWeight = "1";
         indoorWeight = "1";
         outdoorWeight = "1";
            homingCount = "0";
            locked = "False";
            controlID = "1";
            lockCount = "0";
      };
      new SpawnSphere(SpawnB) {
         position = "167.863 -96.6703 198.015";
         rotation = "0 0 -1 64.3532";
         scale = "0.940827 1.97505 1";
         dataBlock = "SpawnSphereMarker";
         radius = "10";
         sphereWeight = "1";
         indoorWeight = "1";
         outdoorWeight = "1";
            homingCount = "0";
            locked = "False";
            controlID = "2";
            lockCount = "0";
      };
      new SpawnSphere(SpawnC) {
         position = "380.952 -96.5721 230.015";
         rotation = "0 0 -1 64.3532";
         scale = "0.940827 1.97505 1";
         dataBlock = "SpawnSphereMarker";
         radius = "10";
         sphereWeight = "1";
         indoorWeight = "1";
         outdoorWeight = "1";
            homingCount = "0";
            locked = "False";
            controlID = "3";
            lockCount = "0";
      };
      new SpawnSphere(SpawnD) {
         position = "-87.0296 35.2895 223.215";
         rotation = "0 0 -1 64.3532";
         scale = "0.940827 1.97505 1";
         dataBlock = "SpawnSphereMarker";
         radius = "10";
         sphereWeight = "1";
         indoorWeight = "1";
         outdoorWeight = "1";
            homingCount = "0";
            locked = "False";
            controlID = "4";
            lockCount = "0";
      };
   };
#3
04/18/2006 (10:32 pm)
I guess the server is the only location that knows what the different things in the mission are.