Object Preview in MainMenu
by Stefan Beffy Moises · in Torque Game Engine · 03/24/2002 (11:36 pm) · 32 replies
Hi,
I'm playing around with Frank Bignones' GuiObjectView perso.wanadoo.fr/hysteria/docs/guiCtrls.htm, and it works very well in-game (e.g. in Spocks InventoryManager), but I get this error if I try to use it from the MainMenuGui (that is, before the objects are loaded, ...)
If I try to load the same object AFTER the game/level/mission has loaded, it works just fine...
any idea how to get it to work in the MainMenu?
Do I have to execute some default scripts before it works? I'm trying to implement some type of player selection, especially for the Racing Mod (choose between car or tank,...)
Thanx!!!
I'm playing around with Frank Bignones' GuiObjectView perso.wanadoo.fr/hysteria/docs/guiCtrls.htm, and it works very well in-game (e.g. in Spocks InventoryManager), but I get this error if I try to use it from the MainMenuGui (that is, before the objects are loaded, ...)
Error: attempt to load a version 184 dts-shape, can currently only load version 24 and before.
If I try to load the same object AFTER the game/level/mission has loaded, it works just fine...
any idea how to get it to work in the MainMenu?
Do I have to execute some default scripts before it works? I'm trying to implement some type of player selection, especially for the Racing Mod (choose between car or tank,...)
Thanx!!!
About the author
#22
maybe you've made some other changes prior to this stuff?
I mean, you could try to put the declaration
void freeResource(ResourceObject *resObject);
into the public: part of the class definition in resManager.h, but it doesn't make any sense that it works for me when it is private, but it doesn't work for you...
anyhow, give it a try, if you want...
Frank, do you have any further ideas what may be wrong?
EDIT: yeah, but first make sure your build is really "clean" ... you never know what VC is doing ;-)
03/29/2002 (2:46 am)
No, the change list doesn't mention anything concering the resManager...maybe you've made some other changes prior to this stuff?
I mean, you could try to put the declaration
void freeResource(ResourceObject *resObject);
into the public: part of the class definition in resManager.h, but it doesn't make any sense that it works for me when it is private, but it doesn't work for you...
anyhow, give it a try, if you want...
Frank, do you have any further ideas what may be wrong?
EDIT: yeah, but first make sure your build is really "clean" ... you never know what VC is doing ;-)
#23
You should really check that you did not modify it before.
03/29/2002 (3:23 am)
Something is weird 'cause in my ResManager.h line 257, there is no freeRessource declaration. The declaration of freeRessource is at line 306 and in the public section of the class.You should really check that you did not modify it before.
#24
03/29/2002 (3:24 am)
@Steffan: BTW the error your get 'cannot load ...' is a side-bug when you are trying to load a file and it does not find it :)
#25
But the thing with the resManager.h is strange ...
I've got it in the public section, too... could have sweared I've replaced it with the Spocks objectview.zip files (where it is in the private section)...
Anyhow, I've uploaded my resManager stuff to privat.schlund.de/b/beffy/pics/tork/resManager.zip, I guess these will work for you, too, Gary!
03/29/2002 (3:48 am)
Yeah, that's what I suspected...But the thing with the resManager.h is strange ...
I've got it in the public section, too... could have sweared I've replaced it with the Spocks objectview.zip files (where it is in the private section)...
Anyhow, I've uploaded my resManager stuff to privat.schlund.de/b/beffy/pics/tork/resManager.zip, I guess these will work for you, too, Gary!
#26
first i dindt realise there was a diference be tween the 2 "clean" things now i do ,,,i started from a "fresh head" did the total clean and moved the line to to 306 (like frank said) and bam! no errors :)
so thanks alot for setting me straight,,,i do the script when i get my box homw from work
thanks again
03/29/2002 (3:50 am)
YA! hehe first i dindt realise there was a diference be tween the 2 "clean" things now i do ,,,i started from a "fresh head" did the total clean and moved the line to to 306 (like frank said) and bam! no errors :)
so thanks alot for setting me straight,,,i do the script when i get my box homw from work
thanks again
#27
I have the latest version 1.1.2 and during compilation I didn't get any error. I changed the cs files a started the demo. When I push the button "Start Mission", the new gui is coming up. First I noticed, that outside the new gui canvas, I can paint with the mouse cursor. The background bitmap isn't rebuild when leaving the mouse cursor. Is that like it should?? I can preview the missions and I can preview my player models. But when I select go, nothing happens ! The last lines in the console shows these errors:
fps/client/ui/terrainPreviewGui.gui (347): Unknown command setConnectArgs.
Object ServerConnection(1406) GameConnection -> NetConnection -> SimGroup -> SimSet -> SimObject
fps/client/ui/terrainPreviewGui.gui (348): Unknown command setJoinPassword.
Object ServerConnection(1406) GameConnection -> NetConnection -> SimGroup -> SimSet -> SimObject
fps/client/ui/terrainPreviewGui.gui (349): Unknown command connectLocal.
Object ServerConnection(1406) GameConnection -> NetConnection -> SimGroup -> SimSet -> SimObject
I can't find these commands. Is the preview code not for the latest engine version or what is the mistake I made ??
Thanks Michael
11/22/2002 (5:32 am)
Today I added the code for terrain and player preview to my engine code. I did it as it was posted on this link: http://tork.zenkel.com/tutorials/preview_gui/preview_gui.htmlI have the latest version 1.1.2 and during compilation I didn't get any error. I changed the cs files a started the demo. When I push the button "Start Mission", the new gui is coming up. First I noticed, that outside the new gui canvas, I can paint with the mouse cursor. The background bitmap isn't rebuild when leaving the mouse cursor. Is that like it should?? I can preview the missions and I can preview my player models. But when I select go, nothing happens ! The last lines in the console shows these errors:
fps/client/ui/terrainPreviewGui.gui (347): Unknown command setConnectArgs.
Object ServerConnection(1406) GameConnection -> NetConnection -> SimGroup -> SimSet -> SimObject
fps/client/ui/terrainPreviewGui.gui (348): Unknown command setJoinPassword.
Object ServerConnection(1406) GameConnection -> NetConnection -> SimGroup -> SimSet -> SimObject
fps/client/ui/terrainPreviewGui.gui (349): Unknown command connectLocal.
Object ServerConnection(1406) GameConnection -> NetConnection -> SimGroup -> SimSet -> SimObject
I can't find these commands. Is the preview code not for the latest engine version or what is the mistake I made ??
Thanks Michael
#28
createServer(%serverType, %mission);
localConnect($pref::Player::Name);
Now I can start my missions, but another problem occurs. I can only start one player model, if I select the other one I get the following error:
Object 'LightMaleHumanArmor' is not a member of the 'GameBaseData' data block class
fps/server/scripts/game.cs (291): Register object failed for object (null).
Set::add: Object "0" doesn't exist
fps/server/scripts/game.cs (295): Unable to find object: '0' attempting to call function 'setTransform'
fps/server/scripts/game.cs (296): Unable to find object: '0' attempting to call function 'setEnergyLevel'
fps/server/scripts/game.cs (297): Unable to find object: '0' attempting to call function 'setShapeName'
fps/server/scripts/game.cs (300): Unable to find object: '0' attempting to call function 'getEyeTransform'
What's going on, I can preview both models but can star only one ? There is still the painting on th background.
11/22/2002 (6:32 am)
Now I changed the part to start the mission like this:createServer(%serverType, %mission);
localConnect($pref::Player::Name);
Now I can start my missions, but another problem occurs. I can only start one player model, if I select the other one I get the following error:
Object 'LightMaleHumanArmor' is not a member of the 'GameBaseData' data block class
fps/server/scripts/game.cs (291): Register object failed for object (null).
Set::add: Object "0" doesn't exist
fps/server/scripts/game.cs (295): Unable to find object: '0' attempting to call function 'setTransform'
fps/server/scripts/game.cs (296): Unable to find object: '0' attempting to call function 'setEnergyLevel'
fps/server/scripts/game.cs (297): Unable to find object: '0' attempting to call function 'setShapeName'
fps/server/scripts/game.cs (300): Unable to find object: '0' attempting to call function 'getEyeTransform'
What's going on, I can preview both models but can star only one ? There is still the painting on th background.
#29
i get an error in terdata.cc, in this section
//------------------------------------------------
bool TerrainBlock::addToClientGraph()
...
mTextureCallbackKey = TextureManager::registerEventCallback(terrainTextureEventCB, U32(this));
the error I'm getting in VC++2005 is....
7>..\engine\terrain\terrData.cc(919) : error C2664: 'TextureManager::registerEventCallback' : cannot convert parameter 2 from 'U32' to 'void *'
7> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Any pointers? =)
06/23/2006 (2:48 am)
Geeze all these posts are dated.... I have this almost working on 1.4 I'm only hung up on one error... I'm hoping someone might please help me with this :) :)i get an error in terdata.cc, in this section
//------------------------------------------------
bool TerrainBlock::addToClientGraph()
...
mTextureCallbackKey = TextureManager::registerEventCallback(terrainTextureEventCB, U32(this));
the error I'm getting in VC++2005 is....
7>..\engine\terrain\terrData.cc(919) : error C2664: 'TextureManager::registerEventCallback' : cannot convert parameter 2 from 'U32' to 'void *'
7> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Any pointers? =)
#30
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9981
06/23/2006 (7:27 am)
If you have TLK, there's a version that is made specifically for 1.4 and works perfectly.www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9981
#31
06/23/2006 (11:20 am)
No, no lighting kit... so I guess if I find a way to update all this to 1.4 I'll submit it back for the comunity, unless someone already has, or would... =)
#32
07/01/2006 (1:28 am)
Edit: got the lighting kit :)
Associate Stefan Beffy Moises