[T2 Scripting Problem]

r0gue3
03-21-2003, 08:03 AM
I got a problem with a script that I just started using.

EngineerHUD. When trying to watch a demo that I made while using this script, the CC screen was up the ENTIRE map (in the demo).

Now, its kinda neet to see the troop movement and all that, but I'd like to see what "I" was trying to do.

Any you guys ever seen this problem?

Thanks in advance.

mine_disc
03-21-2003, 08:19 AM
I experienced it.
You need to install tribes1 and delete tribes2

Nikita
03-21-2003, 09:12 AM
Get rid of the script when watching demos?

r0gue3
03-21-2003, 09:14 AM
Get rid of the script when watching demos?

No, it turns the CC on for everybody (even those who don't have it installed). Like the demo is borked due to this.

ilys
03-21-2003, 09:25 AM
If you load up T2 with the dos prompt console (enableWinConsole(1);) you can type Canvas.setContent(PlayGui ); to close the CC (The standard console is unusable duing demo playback). You will have to do this several times during the demo as the CC is activated after a couple of events (i believe anything that calls ClientCmdDisplayHuds).

I've also done a quick script.
// #autoload
// #name = toggleDemoCC

package toggleDemoCC
{
function StartSelectedDemo()
{
parent::StartSelectedDemo ();
if($DemoPlaybackLength != 0)
{
$globalActionMapOnly = false;
GlobalActionMap.bind(keyb oard, "c", toggleCanvasContent);
}
}

function demoPlaybackComplete()
{
parent::demoPlaybackCompl ete();
GlobalActionMap.unbind(ke yboard, c);
}

function toggleCanvasContent(%val)
{
if(%val)
{
%canvas = Canvas.getContent().getNa me();
if(%canvas $= "CommanderMapGui")
Canvas.setContent(PlayGui );
else if(%canvas $= "PlayGui")
Canvas.setContent(Command erMapGui);
}
}
};
activatePackage(toggleDem oCC);

When the CC opens, press C to close it. You can also press C to open it if you want. Again, you will need to press C to close the CC everytime it opens. Not the best fix, but its also useful if you dont have the bug and just want to view the CC.
EDIT: Updated to allow you to control the CC (Zoom in, move around, etc).

Now another one that automaticly closes the CC whenever it opens during demo playback.
// #autoload
// #name = AutoCloseDemoCC

package AutoCloseDemoCC
{
function CommanderMapGui::onWake(% this)
{
parent::onWake(%this);
if($globalActionMapOnly == true)
Canvas.setContent(PlayGui );
}
};
activatePackage(AutoClose DemoCC);
It can get VERY annoying with the CC toggle sounds going off all the time, so i'd recommend getting a script to mute it.

r0gue3
03-21-2003, 11:09 AM
If you load up T2 with the dos prompt console (enableWinConsole(1);) you can type Canvas.setContent(PlayGui ); to close the CC (The standard console is unusable duing demo playback). You will have to do this several times during the demo as the CC is activated after a couple of events (deaths, vehicle purchase, etc). I'm sure a simple script can be made to add a bind during demo playback to do this.

EDIT: I did it anyway.
// #autoload
// #name = toggleDemoCC

package toggleDemoCC
{
function StartSelectedDemo()
{
parent::StartSelectedDemo ();
GlobalActionMap.bind(keyb oard, "c", toggleCanvasContent);
}

function demoPlaybackComplete()
{
parent::demoPlaybackCompl ete();
GlobalActionMap.unbind(ke yboard, c);
}

function toggleCanvasContent(%val)
{
if(%val)
{
%canvas = Canvas.getContent().getNa me();
if(%canvas $= "CommanderMapGui")
Canvas.setContent(PlayGui );
else if(%canvas $= "PlayGui")
Canvas.setContent(Command erMapGui);
}
}
};
activatePackage(toggleDem oCC);
Doing it the way I did there could be a problem with the globalbind not being deleted if the demo does not play.
When the CC opens, press C to close it. You can also press C to open it if you want.


OMG Thanks ilys! That fixes the cc thing, AND now I can toggle the CC in a demo and see the troop movements!

Sweet!!!