User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Level Editor Difficulties

  1. #1
    Clicker Fusion 2.5Android Export Module
    Deaval's Avatar
    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Level Editor Difficulties

    Howdy,

    I'm making a level editor for my platformer.

    I ran into some problems with the loading part however.


    For the saving I use the good ol' loop to save the objects forming a .ini file that looks a little something like this:

    [Info]
    ObjectCount=3
    [Objects]
    ObjectID0XPOS=416
    ObjectID0YPOS=288
    ObjectID1XPOS=480
    ObjectID1YPOS=160
    ObjectID2XPOS=224
    ObjectID2YPOS=224

    Now to load it I start a loop in the number given by the .ini objectcount

    When on the load loop I set X and Y positions of the object(tried qualifier too) given by the .ini

    This doesn't work that well however. Or rather not at all. I can easily make one appear in the place I want but it seems a totally different way is required for multiple objects.

    I'd prefer the level editor to only use the regular INI extension.

    Any help on the matter is very much appreciated!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    How about you try this: When you load a level, you first destroy the objects, then run the fastloop. Then, on each loop, you create the object, and then you position it. That should fix the issue.

  3. #3
    Clicker Fusion 2.5Android Export Module
    Deaval's Avatar
    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by happygreenfrog View Post
    How about you try this: When you load a level, you first destroy the objects, then run the fastloop. Then, on each loop, you create the object, and then you position it. That should fix the issue.
    Thank you, but how do I make conditions for EACH loop?

    I get I need a counter to keep track of what ID it's on but I'm not sure how that condition/code would go.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I never said anything about a ForEach loop. If you need an example of saving and loading levels in a level editor, let me know.

  5. #5
    Clicker Fusion 2.5Android Export Module
    Deaval's Avatar
    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by happygreenfrog View Post
    on each loop
    Sorry, I meant how to make a on each loop condition. :P

    But sure I would probably benefit from a example or tutorial, thanks.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I meant on each fastloop iteration. Sorry for the confusion! A simple "on loop" condition will do the trick. P.S. Nice avatar!

  7. #7
    Clicker Fusion 2.5Android Export Module
    Deaval's Avatar
    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, Master of Recursion.

    Heh, think we both confused each other a bit.

    My issue isn't placing the objects though, but rather keeping track of the current ID to place. :S

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Deaval View Post
    Thanks, Master of Recursion.

    Heh, think we both confused each other a bit.

    My issue isn't placing the objects though, but rather keeping track of the current ID to place. :S
    Oh. You can actually retrieve the fastloop's current iteration number using the following expression:
    Code:
    LoopIndex("LoopNameHere")
    Does that help?

  9. #9
    Clicker Fusion 2.5Android Export Module
    Deaval's Avatar
    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, this is what I got this far

    +Start of frame
    - Destroy objects

    +Upon pressing space bar
    - Start loop load

    +On loop load
    -Set Global value= GroupItemValue( "Ini", "Objects", "ObjectID"+Str$(LoopIndex("load")))


    +Alterable value of Qualifier = LoopIndex("load")
    - Set X position to "Ini", "Objects", "XPOS"
    - Set Y Position to "Ini", "Objects", "YPOS"


    and as you can probably tell it doesn't work. I'm abit puzzled.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I think I will just go ahead and make you an example. It might take a little while to make one, though.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Level editor that uses MMF2's own frame editor
    By Shawn in forum File Archive
    Replies: 35
    Last Post: 9th November 2013, 07:34 PM
  2. (0,0) difficulties, origin difficulties
    By Beginier in forum File Archive
    Replies: 4
    Last Post: 25th April 2009, 11:59 PM
  3. Level Editor
    By dragonguy in forum File Archive
    Replies: 10
    Last Post: 22nd May 2008, 10:21 PM
  4. Level Editor
    By Almightyzentaco in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 24th October 2007, 09:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •