Game Development Community

Whack a Mole datablock error

by Richard Van Stone · in Torque Game Builder · 08/01/2006 (10:12 am) · 1 replies

I don't know if I've entered in something incorrectly but I'm not sure what's going on here.

I created a datablock for the moles and then went into TGB and set the datablock to the appropriate selection, then went back and imported 8 mole hills to set them as spawnpoints. I then saved my project and reloaded. When I did this the molehills were now half the size I originally set them, no longer connected to the spawnpoint datablock which was odd. In addition to that on reload the datablock does not exist anylonger. However, if I hit f5 to start the game, then stop it the datablock exists. Has anyone encountered this problem before?

Rich

#1
08/01/2006 (10:27 am)
The datablock is only created with you run the project, so on start up it's not there. An easy fix is to move the exec statement that runs your spawnpoint code out of the start game function and to the yop of game.cs.
(Note: this is all from memory, I don't have TGB handy at the moment).

Once you do that, the datablock will be available and you won't lose your definitions any more.