Disappearing Units
by Brian Uptagrafft · in RTS Starter Kit · 04/10/2006 (12:01 pm) · 5 replies
Hi again,
I've found something a bit odd that I can't quite figure out. If I make any modifications to the RTSUnit class in C++, my units don't show up when I load the engine, but I can drag-select and the circles show up inside the selection. If I release the drag selection, it selects just one of the circles. This happens if I add even a single, simple variable to the RTSUnit.h. Any ideas?
Thanks!
I've found something a bit odd that I can't quite figure out. If I make any modifications to the RTSUnit class in C++, my units don't show up when I load the engine, but I can drag-select and the circles show up inside the selection. If I release the drag selection, it selects just one of the circles. This happens if I add even a single, simple variable to the RTSUnit.h. Any ideas?
Thanks!
About the author
#2
I have a fully customized RTSUnit class, so that isnt the problem.
In VS2005e r-Click on the solution and click "ReBuild".
05/09/2006 (10:15 am)
Try a full recompile -- if taking the variable away doesnt help.I have a fully customized RTSUnit class, so that isnt the problem.
In VS2005e r-Click on the solution and click "ReBuild".
#3
05/09/2006 (10:56 am)
Hmm it must be a problem with the script actually because when I use it on the original rts project it works
#4
you can edit/change scripts and see immediate results without a rebuild
btw Ricky I can turn your units blue in mipmap for ya with a couple quick edits
in example\common\server directory
IN clientConnection.cs
=====
// Send mission information to the client
sendLoadInfoToClient( %client );
ADD
sendStatsListToClient( %client );
sendTeamInfoToClient( %client);
=====
colored units display is TEAM info
=====find this block=====
// Save client preferences on the connection object for later use.
%client.gender = "Male";
%client.armor = "Light";
%client.race = "Human";
%client.skin = addTaggedString( "base" );
%client.setPlayerName(%name);
%client.score = 0;
and ADD this line at end
%client.ready = false;
=====
Don't understand this one lobby isnt controlled here but it needs it.
The ready=false in server.cs controls the lobby ready function.
Lastly "purely cosmetic change"
find
// Inform the client we've joined up
messageClient(%client,
'MsgClientJoin', '\c2Welcome to the Torque demo app %1.',
and change last line to:
'MsgClientJoin', '\c2Welcome to the RTS Lobby, %1.',
save the clientConnection.cs file and you should get blue units in mipmap
assuming you have these files from
RTSStarterKit\example\common\server
prefs.cs
server.cs
server.cs.dso
copied to
SDK\example\common\server
so you have a LOBBY to host multiplayer
05/09/2006 (7:47 pm)
Scripts (.cs) are not project resources a clean/build will not cure problems from scripting errorsyou can edit/change scripts and see immediate results without a rebuild
btw Ricky I can turn your units blue in mipmap for ya with a couple quick edits
in example\common\server directory
IN clientConnection.cs
=====
// Send mission information to the client
sendLoadInfoToClient( %client );
ADD
sendStatsListToClient( %client );
sendTeamInfoToClient( %client);
=====
colored units display is TEAM info
=====find this block=====
// Save client preferences on the connection object for later use.
%client.gender = "Male";
%client.armor = "Light";
%client.race = "Human";
%client.skin = addTaggedString( "base" );
%client.setPlayerName(%name);
%client.score = 0;
and ADD this line at end
%client.ready = false;
=====
Don't understand this one lobby isnt controlled here but it needs it.
The ready=false in server.cs controls the lobby ready function.
Lastly "purely cosmetic change"
find
// Inform the client we've joined up
messageClient(%client,
'MsgClientJoin', '\c2Welcome to the Torque demo app %1.',
and change last line to:
'MsgClientJoin', '\c2Welcome to the RTS Lobby, %1.',
save the clientConnection.cs file and you should get blue units in mipmap
assuming you have these files from
RTSStarterKit\example\common\server
prefs.cs
server.cs
server.cs.dso
copied to
SDK\example\common\server
so you have a LOBBY to host multiplayer
#5
Also, the lobby wont help the units reappear?
That has to be a C++ error. A rebuild usually helps stuff like that, I've had to do it about 3 times now (TGB or TGE).
Its needs %client.ready = false, because it defaults to '0', this is just setting the default.
05/10/2006 (7:29 am)
William, I already have blue units, read the community project thread. xDAlso, the lobby wont help the units reappear?
That has to be a C++ error. A rebuild usually helps stuff like that, I've had to do it about 3 times now (TGB or TGE).
Its needs %client.ready = false, because it defaults to '0', this is just setting the default.
Torque Owner Johnathan Moore