TGB Mouse Control Loss & Rock Moving
by Merrie Schonbach · in Torque Game Engine · 09/22/2006 (7:08 pm) · 3 replies
I am considering getting the TGB as I currently have the TGE and not making much headway, think I should start with smaller steps and 2D might be the ticket. I am working with the TGB Fish Demo Tutorial and have come across 2 odd problems.
First when I go to run the program I loose mouse control, and second instead of the fish moving the rocks move off to the right. Below is the game.cs file which is located in the gameScripts folder.
Another odd note, I played the demo version of Tank Buster and didn't have any problems.
//---------------------------------------------------------------------------------------------
// endGame
// Game cleanup should be done here.
//---------------------------------------------------------------------------------------------
function endGame()
{
sceneWindow2D.endLevel();
moveMap.pop();
}
function FishClass::onLevelLoaded(%this, %scenegraph)
{
%this.setLinearVelocityX(20);
}
I have also selected the fish and put in FishClass in the Scripting/Class section in the engine.
First when I go to run the program I loose mouse control, and second instead of the fish moving the rocks move off to the right. Below is the game.cs file which is located in the gameScripts folder.
Another odd note, I played the demo version of Tank Buster and didn't have any problems.
//---------------------------------------------------------------------------------------------
// endGame
// Game cleanup should be done here.
//---------------------------------------------------------------------------------------------
function endGame()
{
sceneWindow2D.endLevel();
moveMap.pop();
}
function FishClass::onLevelLoaded(%this, %scenegraph)
{
%this.setLinearVelocityX(20);
}
I have also selected the fish and put in FishClass in the Scripting/Class section in the engine.
About the author
3D Artist, avid gamer, roleplayer, story-writer.
#2
Any idea why Im loosing mouse control?
09/23/2006 (7:48 am)
Yes sorry, I mistyped, the code is in the game.cs and is correct, I'll check the rocks to see if they are set to scrolling. Any idea why Im loosing mouse control?
#3
09/23/2006 (8:42 am)
I have done the tutorial and I dont lost mouse control. Can you zip your folder up and email it to me and I will test it for you.
Torque Owner Fucifer
function FishClass::onLevelLoaded(%this, %scenegraph) { %this.setLinearVelocityX(20); }Click on the fish then click edit button and make sure you have FishClass in the scripting/Class.
What is your config Datablock it should be FishDatablock. It would be hard to say why rocks move unless you assign the FishClass to them or using the scroller image.