-
Easy level editor
So i thought i could build a simple level editor using the Save Game Object and the Common Dialog Object, but have now been stuck for 3 days with it.
I can get it to save and load the number of blocks and positions from local memory, but when saving it to a file all it can create is 1 block and position.
Any ideas whats wrong?
my Test file:
www.imstockhaus.com/leveleditortest.mfa
-
Re: Easy level editor
You could try using my Level-Save Object, it's specifically designed for creating level editors. ;) It does take a bit of learning, but once you get used to it it makes the process go much faster. If you do decide to use it, make sure to look at the examples, and I can answer any questions you have if you post here. :)
-
Re: Easy level editor
I tried using your object, but the example keeps crashing when the load file frame starts.
Havnt been able to go around it by exporting the file or anything :(
-
Re: Easy level editor
Hmm, that's strange, it works fine for me. :crazy:
What version of Windows do you use? Are you sure you have version 1.0 of the object, and did you put all the files in the right places? When does it crash?
-
Re: Easy level editor
yeah found it weird too, remember i checked it out a couple of years ago and it worked fine back then.
The example crashes when frame 3 is loaded, the "loader level" I get multimedia fusion runtime error and it crashes.
I downloaded it from your link this time to check it's up to date but still gets the same error
Even tried exporting it to an exe, but still get the same crash.
Im on Windows xp SP3
-
Re: Easy level editor
I also use XP SP3, so I guess it's not that.
You could try debugging the example: Remove all the actions to see if that fixes it. If it does, add them back and remove all but a particular section until you isolate it to a small part of the events. If that fails, you could try doing the same with objects in the frame.
Also, do you really need to run the 3rd frame? All it really does is ask for a file to load, put back all the blocks in their same positions, and allow you to move the player around. The code should still work if you adapt it into your application (if I understand correctly). Just ask any questions you have during the process, although I won't have access to MMF for a few days so I don't know how helpful I'll be. :)
-
Re: Easy level editor
thanks for all the quick replies, finally figured out the problem, i was using an outdated version of the dialog object.
never used compare 2 general values before, but i'll try to figure out the code for loading.
-
Re: Easy level editor
Ah, I was going to recommend checking that, but I assumed you had it already given there is only one version (you must've had the beta). :) Good luck adapting the example, and just ask if you need help.
Compare 2 General Values really just does what it says. You put something in the top box (either a number or text), something in the bottom, and a method of comparison. It will be true if the comparison is true, false if it isn't. It's useful when you don't have a specific value of a specific object you want to compare with (for example the value of a counter).
-
Re: Easy level editor
wow really thought i had nailed it, but it turns out it only saves the first tile and doesnt care abaout the rest for some reason. (opened the save file as text and it only mentions tile 1)
Been scratching my head all day at it and cant figure out whats wrong.
Heres the project file if anyone want to check it out.
www.imstockhaus.com//leveleditor2.mfa
you should only be needing to pay attention to the saving and loading categories. I know the system i use now for reading in the files are a joke, but wanted to make it failsafe wile working on it :P
-
Re: Easy level editor
Can't look at your MFA right now (still away) so it's hard to tell what your problem is. Are you adding objects to the Level-Save Object as they're created? So say you've set up your editor to add a tile when the user clicks, you should add the newly created tile in the same action (make sure that action comes AFTER the create tile action).
If nobody else can provide insight, could you post screenshot(s) of the events for adding objects/saving?
-
Re: Easy level editor
I finally figured it out. was some dirt left from my own code messing things up.
Now i love this object!
thanks for all the help Jaffob
-
Re: Easy level editor
Only problem im fighting with is that if you load a level, then trying to load another one after that, everything seems to bug out if you dont restart the aplication.
Is there any way around that?