1.5 Config Datablock and Fish Demo
by Arjan De Jong · in Torque Game Builder · 07/16/2007 (7:22 am) · 2 replies
While working out paragraph 8.2 Creating fish using our config datablock of the Fish Demo tutorial, the added fish make correctly use of the Datablock information. So far so good.
But when I try to play the game, the Fish won't move. Only after removing the Datablock reference in de Config Datablock box, the Fish will start to move.
But when I try to play the game, the Fish won't move. Only after removing the Datablock reference in de Config Datablock box, the Fish will start to move.
#2
I posted it as a bug, because 2 months ago I worked through the fish demo with the 'old' TGB (1.2) version, and did not run into this problem.
but if the search function works than this post should be enough ...
and maybe move it to the public forum.
07/17/2007 (12:30 am)
Tnx, it worksI posted it as a bug, because 2 months ago I worked through the fish demo with the 'old' TGB (1.2) version, and did not run into this problem.
but if the search function works than this post should be enough ...
and maybe move it to the public forum.
Torque Owner Laralyn McWilliams
Open ..game/main.cs
In the function initializeProject() section, add a line to execute datablocks.cs. It is not executed until you add it to this section. After the change, that section of my main.cs looked like this:
function initializeProject() { // Load up the in game gui. exec("~/gui/mainScreen.gui"); // Exec game scripts. exec("./gameScripts/game.cs"); [b]exec("./gameScripts/datablocks.cs");[/b] // This is where the game starts. Right now, we are just starting the first level. You will // want to expand this to load up a splash screen followed by a main menu depending on the // specific needs of your game. Most likely, a menu button will start the actual game, which // is where startGame should be called from. startGame( expandFilename($Game::DefaultScene) ); }Then reload the project and it should work.
I was going to log this as a separate bug. Is there a place we should log documentation bugs, or is this post enough? :-)