Loading Mission" doesn't load
by Nick Everwood · in Artist Corner · 01/06/2007 (7:25 pm) · 12 replies
Well, I was workinf with "Getting Started" pdf file and got to the part about making GUIs. I made the start button, types in the command box "loadMyMission();", saved, and restarted the demo. I clicked on the "start" button I had made, it went to the loading screen, and nothing happened. After about a minute, I clicked cancel and tried again. This time it gave me a "connecting to server" message, and still nothing happened.
I am wondering if I thas somthing to do with the way I made my map. It loads when I do a "open mission" approach, but i can't seem to get it to open for me via the start button. Any help?
I am wondering if I thas somthing to do with the way I made my map. It loads when I do a "open mission" approach, but i can't seem to get it to open for me via the start button. Any help?
About the author
#2
01/07/2007 (7:04 am)
The name of the mission in GameOne.mis. I assumed that you put GameOne.mis into the paranthesis. A little new at this.
#3
Open your way to your game files directory. So, if you games name is MoonlightHorror (just a randomly picked name for example.)
C:\Torque\SDK\example\MoonlightHorror
Now open the main cs file in whatever text editor you wish (notepad works if its your only choice.)
Scroll all the way to the bottom and you will find the "loadMyMission" function. Since this is the command your using and seem to be having problems with, check there. One line should say
createServer("SinglePlayer", expandFilename("a directory"));
Now of course where it says a directory it will havesomething else. You will have to set that to the directory for your map. So you should make yours look like this.
"./data/missions/GameOne.mis"
That is the only thing I can think of since I did have the same problem when I started.
01/15/2007 (1:58 pm)
You have to make sure the mission you made is being loaded. The "loadMyMission();"part is right, but did you make sure the map loaded is "GameOne.mis"? Heres what you can do to check.Open your way to your game files directory. So, if you games name is MoonlightHorror (just a randomly picked name for example.)
C:\Torque\SDK\example\MoonlightHorror
Now open the main cs file in whatever text editor you wish (notepad works if its your only choice.)
Scroll all the way to the bottom and you will find the "loadMyMission" function. Since this is the command your using and seem to be having problems with, check there. One line should say
createServer("SinglePlayer", expandFilename("a directory"));
Now of course where it says a directory it will havesomething else. You will have to set that to the directory for your map. So you should make yours look like this.
"./data/missions/GameOne.mis"
That is the only thing I can think of since I did have the same problem when I started.
#4
01/16/2007 (5:58 pm)
Ok cook im havin same problem. Thankx I will try this.
#5
01/16/2007 (11:16 pm)
I tried this and didnt work?
#6
01/16/2007 (11:23 pm)
I tried this and didnt work?
#7
"loadMyMission();" for a command?
Remember, you have to open the main.cs file in your custom game folder. And in the bottom function (loadMyMission) you should have the directory to your map and its correct name. If these things did not fix the problem, it could be something simple like saving the map in the wrong folder. Make sure your map that you are trying to load is in the
"C:\Torque\SDK\example\NewGame\data\missions" folder.
(Of course NewGame is just an example for the game folder. If you followed the tutorial it will go by GameOne or if you went in your own direction it will be whatever you choose it to be.)
01/17/2007 (11:57 am)
So you placed in the correct directory and the correct mission name? The start button says "loadMyMission();" for a command?
Remember, you have to open the main.cs file in your custom game folder. And in the bottom function (loadMyMission) you should have the directory to your map and its correct name. If these things did not fix the problem, it could be something simple like saving the map in the wrong folder. Make sure your map that you are trying to load is in the
"C:\Torque\SDK\example\NewGame\data\missions" folder.
(Of course NewGame is just an example for the game folder. If you followed the tutorial it will go by GameOne or if you went in your own direction it will be whatever you choose it to be.)
#8
[IMG]http://img440.imageshack.us/img440/4451/picture10jz2.png[/IMG]
[IMG]http://img403.imageshack.us/img403/390/picture11pv4.png[/IMG]
[IMG]http://img403.imageshack.us/img403/4003/picture14yv3.png[/IMG]
01/19/2007 (12:30 pm)
Thanks for the reply, sorry to be a burden. It still doesn't appear to be working. I did exactly what you said twice, and deleted the .dso file (i think that's what your supposed to do after modifying the main.cs), but again it gave the a "loading" message, lacking the actualy loading. When I canceled and clicked on it again, it gave me a "waiting for server" message. Could it be somthing with the map? Attached it a picture of my main.cs, the loading screen, and the waiting screen. Sorry for not being good at this :P[IMG]http://img440.imageshack.us/img440/4451/picture10jz2.png[/IMG]
[IMG]http://img403.imageshack.us/img403/390/picture11pv4.png[/IMG]
[IMG]http://img403.imageshack.us/img403/4003/picture14yv3.png[/IMG]
#9
01/19/2007 (4:45 pm)
I also did this and then deleted and started over and made sure there were no mistakes and the same thing happens. I am sure I am saving to the right directory. Double checking the main.cs file. All seem to be fine.
#10
1.) Copied the folder "tutorial.base" at the following location. "C:\Torque\SDK\example"
2.) Named this folder "GameOne".
3.) I opened the main.cs file at the following directory. "C:\Torque\SDK\example"
This file is the file that contains everything the torque executable file will do.
4.) When this is opened, you will see the following two scripts near the top.
$defaultGame = "tutorial.base";
$displayHelp = false;
Change "tutorial.base" to "GameOne".
5.) Now doubleclick the "torqueDemo" executable file in the example folder. You should get the default gui. From here you make a map, etc. Save your map to the following location.
C:\Torque\SDK\example\GameOne\data\missions
I named my mission "gameonemission.mis". If you named it something else open your main.cs file at the following location.
C:\Torque\SDK\example\GameOne
Scroll all the way to the bottom. Under the LOAD MY MISSION section change
createServer("SinglePlayer", expandFilename("./data/missions/gameonemission.mis"));
to
createServer("SinglePlayer", expandFilename("./data/missions/MissionNameHere.mis"));
6.) Now for our final part. Create your new gui and make two buttons. (GuiButtonCtrl option under New Control.) Make one say START and the other say QUIT. Put the following commands in the command spot under the parent options.
START command: loadMyMission();
QUIT command: quit();
This is it. If I was unclear on any of this I apolagize. If it does not still work then i'm not sure what it is. Perhapds I can take a look at the main.cs files, gui button commands, etc.
01/19/2007 (7:21 pm)
Ok, not sure what it is that might be wrong at this point. But maybe it's something simple we are all just hardly missing. So I made a quick started project and i'll tell you what I did in a few steps. Follow along with them and check your files to see if they are similar. 1.) Copied the folder "tutorial.base" at the following location. "C:\Torque\SDK\example"
2.) Named this folder "GameOne".
3.) I opened the main.cs file at the following directory. "C:\Torque\SDK\example"
This file is the file that contains everything the torque executable file will do.
4.) When this is opened, you will see the following two scripts near the top.
$defaultGame = "tutorial.base";
$displayHelp = false;
Change "tutorial.base" to "GameOne".
5.) Now doubleclick the "torqueDemo" executable file in the example folder. You should get the default gui. From here you make a map, etc. Save your map to the following location.
C:\Torque\SDK\example\GameOne\data\missions
I named my mission "gameonemission.mis". If you named it something else open your main.cs file at the following location.
C:\Torque\SDK\example\GameOne
Scroll all the way to the bottom. Under the LOAD MY MISSION section change
createServer("SinglePlayer", expandFilename("./data/missions/gameonemission.mis"));
to
createServer("SinglePlayer", expandFilename("./data/missions/MissionNameHere.mis"));
6.) Now for our final part. Create your new gui and make two buttons. (GuiButtonCtrl option under New Control.) Make one say START and the other say QUIT. Put the following commands in the command spot under the parent options.
START command: loadMyMission();
QUIT command: quit();
This is it. If I was unclear on any of this I apolagize. If it does not still work then i'm not sure what it is. Perhapds I can take a look at the main.cs files, gui button commands, etc.
#11
Anyways I went to C:/Torque/SDK/Example/GameOne/Data/missions and I changed the mis file to GameOnemissions.mis. Let me know if this works for you. Thankx
01/20/2007 (12:18 am)
I got it to work a little further. Now it freezes when it is loading lighting. Anyways I went to C:/Torque/SDK/Example/GameOne/Data/missions and I changed the mis file to GameOnemissions.mis. Let me know if this works for you. Thankx
#12
Also, try going inot the editor on your lighting and doing a full relight, saving, and go from there.
01/20/2007 (2:31 pm)
^ Aye, it worked for me, too. I wonder why the normal "GameOne.mis" name didn't work.Also, try going inot the editor on your lighting and doing a full relight, saving, and go from there.
Torque 3D Owner Aun Taraseina
And what is in your "loadMyMission();"
Aun