Page 1 of 1

Issue while loading a GED file in-game

PostPosted: Mon Apr 22, 2013 4:52 am
by bamby1983
I've made multiple GED files - one for each level and one launch pad ged to load each of those levels. Each of these levels works perfectly when they are loaded directly in game editor. However, the same functionality breaks down when loaded from a separate GED. Objects are no longer dropped at the required position, animations that were initially stopped are now in motion. I resolved the latter by adding an extra screen to each level when it loads and requiring the player to click it to start the level. This executed the necessary animation stop code here instead of in the view's create actor (where it was not being read correctly. However, the former issue still exists, and I cannot test for other issues because this first one prevents me from playing further.

Does anyone know about such issues encountered while loading one GED file from another? Also, when I try exporting each level independently as a Windows executable, Game Editor crashes. I use a Windows 7 laptop.

Re: Issue while loading a GED file in-game

PostPosted: Wed Apr 24, 2013 12:03 am
by skydereign
bamby1983 wrote:Objects are no longer dropped at the required position,

What kind of objects? Tiled actors don't load properly from a LoadGame call within the editor (though it does work in the executables). Another thing... I believe actors aren't created all at the same time, and then the create actor events are run. When loading a game, it will create an actor, run its create actor event, and move on. So, if you have the view's create actor changing animations of other actors that are supposed to exist, this isn't necessarily true, as they may not have been created yet. This doesn't happen when loading a game directly, as they already have been created in advance (within the editor).

bamby1983 wrote:Also, when I try exporting each level independently as a Windows executable, Game Editor crashes. I use a Windows 7 laptop.

People have noted this problem. http://game-editor.com/forum/viewtopic.php?f=2&t=10665& I'm not aware if anyone found an actual solution to it though. Though it was brought up several times, so I could just be forgetting the solution.

Re: Issue while loading a GED file in-game

PostPosted: Mon Apr 29, 2013 11:41 pm
by bamby1983
This occurs with regular actors (not tiled, not cloned). The view actor does not have anything affecting that actor anymore. I moved all code to another in-game function that is executed when the player clicks an actor to start the level. It still does not work, though. :(

Re: Issue while loading a GED file in-game

PostPosted: Mon Apr 29, 2013 11:56 pm
by skydereign
bamby1983 wrote:This occurs with regular actors (not tiled, not cloned). The view actor does not have anything affecting that actor anymore. I moved all code to another in-game function that is executed when the player clicks an actor to start the level. It still does not work, though. :(

Hmm, if those aren't it, I don't think I've ever experienced this myself. Do you have an example of the problem you can post?

Re: Issue while loading a GED file in-game

PostPosted: Sat May 11, 2013 12:19 am
by bamby1983
Here's the game attached. Level 1 has the issue. When the person picks up the green gift (follow the instructions through the first minute or so and it will appear), and then drops it after moving, the gift lands up in the wrong spot if the game is launched from the Inventech.ged file. If you directly load Level 1.ged, the issue doesn't occur.

Re: Issue while loading a GED file in-game

PostPosted: Mon May 13, 2013 7:22 pm
by skydereign
Well, the Inventech.ged file will not load anything for me because you are trying to use LoadGame at the create of the view actor. At least on machines I've tested, you can't call LoadGame immediately. After changing that though, they both work properly.

Re: Issue while loading a GED file in-game

PostPosted: Wed May 15, 2013 4:25 am
by bamby1983
skydereign wrote:Well, the Inventech.ged file will not load anything for me because you are trying to use LoadGame at the create of the view actor. At least on machines I've tested, you can't call LoadGame immediately. After changing that though, they both work properly.

Actually, I use loadVars(), not loadGame in the view's create actor. Is that what you meant?

I removed the code and put it in my background actor's mouse down even instead. I did not see the same issue but I saw a different set of issues this time. Maybe I'll have to make sure that there is no actor in my view's create actor event in any of the files.

Re: Issue while loading a GED file in-game

PostPosted: Wed May 15, 2013 7:13 am
by skydereign
bamby1983 wrote:Actually, I use loadVars(), not loadGame in the view's create actor. Is that what you meant?

No, I meant the LoadGame used in the Loading.ged is in the view's create actor event. I had to change that to make it load the first level, but after doing that, it worked properly (did not encounter the same problem you have).