Checkers Tutorial in 1.7.2 - networking
by Alex May · in Torque Game Builder · 03/23/2008 (5:19 pm) · 2 replies
I've been trying to do the checkers tutorial with version 1.7.2 and have gotten to step 2 where you're supposed to be able to test the networking after adding "Canvas.pushDialog(NetworkMenu);" to the onStartUp function and "$Game::UsesNetwork = true;" to the common.cs script. When I start the game, the network menu never comes up and I'd like to know why if anyone can help me out.
here's what I have for the onStartUp:
function onStartUp()
{
$mainScreen = mainScreenGui;
$mouseObj = new t2dSceneObject() {sceneGraph = $checkersScene;};
$none = 0;
$red = 1;
$blue = 2;
$redKing = 3;
$blueKing = 4;
$true = 1;
$false = 0;
$no = 0;
$yes = 1;
function redChecker::onLevelLoaded(%this, %scenegraph)
{
$redChecker = %this;
}
function blueChecker::onLevelLoaded(%this, %scenegraph)
{
$blueChecker = %this;
}
Canvas.pushDialog(NetworkMenu);
}
here's what I have for the onStartUp:
function onStartUp()
{
$mainScreen = mainScreenGui;
$mouseObj = new t2dSceneObject() {sceneGraph = $checkersScene;};
$none = 0;
$red = 1;
$blue = 2;
$redKing = 3;
$blueKing = 4;
$true = 1;
$false = 0;
$no = 0;
$yes = 1;
function redChecker::onLevelLoaded(%this, %scenegraph)
{
$redChecker = %this;
}
function blueChecker::onLevelLoaded(%this, %scenegraph)
{
$blueChecker = %this;
}
Canvas.pushDialog(NetworkMenu);
}
Associate Mike Lilligreen
Retired T2Der
function onStartUp() { $mainScreen = mainScreenGui; $mouseObj = new t2dSceneObject() {sceneGraph = $checkersScene; }; // initialize the values for the checker boards $none = 0; $red = 1; $blue = 2; $redKing = 3; $blueKing = 4; // some helpful values $true = 1; $false = 0; $no = 0; $yes = 1; Canvas.pushDialog(NetworkMenu); } function redChecker::onLevelLoaded(%this, %scenegraph) { $redChecker = %this; } function blueChecker::onLevelLoaded(%this, %scenegraph) { $blueChecker = %this; }The console should be telling you when you have errors in script like this. You can pull up the console by pressing the CTRL ~ keys.