Pleas ehelp making the RTSCamera work
by Wolfgang Kurz · in RTS Starter Kit · 11/01/2006 (12:20 pm) · 2 replies
Hello all,
i am very frustrated:-(
I put together a very simple mission which loads fine when i use standard tge and the 1st person view
my code then looks like this in the enter game part:
i checked int he RTS-starter kit and found the next bit of code which makes sence but it doesnt work at all
depending on how i try it i get either just a blank screen or i get this error
Fatal: (c:\rtskitmerge\sdk\engine\game\rts\rtscamera.cc @ 546) Not an RTS connection!
please can anyone point me in the right direction
i have been trying this for like 9 hours now :-(
thx a lot in advance guys
i am very frustrated:-(
I put together a very simple mission which loads fine when i use standard tge and the 1st person view
my code then looks like this in the enter game part:
// Create the player object
%player = new Player() {
dataBlock = MaleAvatar; // defined in player.cs
client = %this; // the avatar will have a pointer to its
}; // owner's connection
// Player setup...
%player.setTransform(%spawnPoint); // where to put it
// Give the client control of the player
%this.player = %player;
%this.setControlObject(%player);i checked int he RTS-starter kit and found the next bit of code which makes sence but it doesnt work at all
// Create an observer cam for fly mode.
// Create a new camera object.
%this.observerCam = new Camera() {
dataBlock = Observer;
};
MissionCleanup.add( %this.observerCam );
// Create a new RTS camera object.
%this.rtsCam = new RTSCamera()
{
dataBlock = RTSObserver;
};
MissionCleanup.add( %this.rtsCam );
// Do scoping
%this.observerCam.scopeToClient(%this);
%this.rtsCam.scopeToClient(%this);
// Start out with the rts cam.
%this.setControlObject(%this.rtsCam);depending on how i try it i get either just a blank screen or i get this error
Fatal: (c:\rtskitmerge\sdk\engine\game\rts\rtscamera.cc @ 546) Not an RTS connection!
please can anyone point me in the right direction
i have been trying this for like 9 hours now :-(
thx a lot in advance guys
#2
sounds like that is indeed the problem:-)
yes i did the merge and will try this tonight after work:-)
11/01/2006 (11:25 pm)
Thx a lot for the responsesounds like that is indeed the problem:-)
yes i did the merge and will try this tonight after work:-)
Torque Owner Gary Preston
From what I remember of the RTS kit, it has its own connection object to handle the slightly different networking needs of an RTS compared to a fps shooter. The error you're getting certainly suggests that you're using the rtsCamera on a standard game connection rather than an "RTS Connection".
If you've correctly merged over all the RTS source files (I'm assuming you've done a merge to allow you to use TGE1.4 or 1.5?) then have a look in the original RTS kit for where the GameConnection is created and switch it to
Its a long time since I've looked at the RTS kit, so I'm not sure if you'll need to do anything else beyond that (assuming the correct scripts have been merged across too), hopefully it will point you in the right direction though.