after editing game.cs Torque 3D freezes
by Eirik Sikveland · in Torque 3D Beginner · 01/18/2013 (9:01 am) · 10 replies
Hello all!
I'm new to the Torque 3D engine but not new to game making.
I'm having a little problem with the game.cs and the Torque 3D to load.
I just bought the FPS Environment Pack and followed the guide to include the pack to my project.
But after I add these codes to the game.cs :
exec("./envAudioProfiles.cs");
exec("./windmill.cs");
exec("./watermill.cs");
exec("./westernwatermill.cs");
exec("./westernwindmill.cs");
exec("./butterflies.cs");
exec("./millsplash.cs");
exec("./chimneysmoke.cs");
exec("./chimneysmokeembers.cs");
exec("./fallingleaf.cs");
The Torque 3D freezes at "Loading Datablocks". If I remove them from the game.cs it loads up just fine again.
Also tried to run the generateProjects.bat but no luck.
Anyone have any idea how to solve this?
Thanks!
I'm new to the Torque 3D engine but not new to game making.
I'm having a little problem with the game.cs and the Torque 3D to load.
I just bought the FPS Environment Pack and followed the guide to include the pack to my project.
But after I add these codes to the game.cs :
exec("./envAudioProfiles.cs");
exec("./windmill.cs");
exec("./watermill.cs");
exec("./westernwatermill.cs");
exec("./westernwindmill.cs");
exec("./butterflies.cs");
exec("./millsplash.cs");
exec("./chimneysmoke.cs");
exec("./chimneysmokeembers.cs");
exec("./fallingleaf.cs");
The Torque 3D freezes at "Loading Datablocks". If I remove them from the game.cs it loads up just fine again.
Also tried to run the generateProjects.bat but no luck.
Anyone have any idea how to solve this?
Thanks!
#2
01/18/2013 (9:17 am)
Check the console.log to see which one is causing the problem. Also make sure you have semi-colons at the end of each of them in your script.
#3
DO NOT make changes to game.cs to include these new files, instead look at adding them to either art/datablocks/datablockExec.cs if datablocks or scripts/server/scriptExec.cs if actual game script.
01/18/2013 (9:21 am)
I'm guessing that those are all datablocks... and I'm presuming that the FPS Environment Pack is for a previous of the engine. There are differences in layout and structure for T3D that would make the contained installation instructions obsolete.DO NOT make changes to game.cs to include these new files, instead look at adding them to either art/datablocks/datablockExec.cs if datablocks or scripts/server/scriptExec.cs if actual game script.
#4
Michael: Ok but I just followed the instructions.
I think it is a script to make the animated objects to work, but where do i put them? in the scriptExec.cs?
01/18/2013 (9:29 am)
The console.log is to long to post here.Michael: Ok but I just followed the instructions.
I think it is a script to make the animated objects to work, but where do i put them? in the scriptExec.cs?
#5
01/18/2013 (9:32 am)
Also, unless this pack was updated for T3D (of which it makes no mention) then all supplied script and datablocks will be looking for incorrect filepaths -- which will result in this issue. You will have to open up each and every one of those script files and verify that the filepath for every particle, sound, and/or other datablocks are pointing to the correct location(s).
#7
01/18/2013 (9:35 am)
Oh, thats alot of unnecessary work.
#8
01/18/2013 (9:38 am)
Quote:Did you actually install the shapes/BuildingSet01/BS01_WindMill01.dts shape to that location? If not, then it is exactly as I suspected. You'll have to manually correct each and every filepath to match the actual locations where you installed the art.
Resource<TSShape>::create - Could not open 'scripts/data/shapes/BuildingSet01/BS01_WindMill01.dts'
#9
In the console.log some of the file path have been changed from:
C:\Users\Eirik\Documents\GitHub\Torque3D\My Projects\Survival test\game\art\sound\watermill_mono_01.ogg
To
C:UsersEirikDocumentsGitHubTorque3DMy ProjectsSurvival testgameartsoundwatermill_mono_01.ogg
which of course turns in to an error.
01/18/2013 (11:12 am)
Hmm, I changed all the script files to the right file path. Some are working and some are not..In the console.log some of the file path have been changed from:
C:\Users\Eirik\Documents\GitHub\Torque3D\My Projects\Survival test\game\art\sound\watermill_mono_01.ogg
To
C:UsersEirikDocumentsGitHubTorque3DMy ProjectsSurvival testgameartsoundwatermill_mono_01.ogg
which of course turns in to an error.
#10
01/18/2013 (11:56 am)
I got it to work! Thanks everyone for the help :)
Torque Owner Robert Fritzen
Phantom Games Development