User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 17 of 17

Thread: Best way for a frame-based level editor in CTF 2.5+ ?

  1. #11
    Clicker Fusion 2.5 (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    64
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    It seems I got stuck quite early.


    Quote Originally Posted by Popcorn View Post
    In this event you will add all the needed information of each object to a string. You may use a global string for best performance. Let's call it LevelString.
    Should I use the String Tokenizer object or just an ordinary String object here?


    Quote Originally Posted by Popcorn View Post
    Split every data with a delimiter such as a comma or any other special character. Like this: OName$("Group.Engine") +","+ X("Group.Engine")+","+Y("Group.Engine"). Remember to include the name of the qualifier. It will pick the name of the actual object.
    I have ensured that everything that should be saved has the Group.Engine qualifier.
    But when I try to use the OName$("Group.Engine") +","+ X("Group.Engine")+","+Y("Group.Engine") on the String Tokenizer or an ordinary String I get this error message "Mixed string and numbers.".

  2. #12
    Clicker Fusion 2.5 MaciOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    TGeorgeMihai's Avatar
    Join Date
    Nov 2015
    Posts
    122
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Volnaiskra View Post
    You don't have to copy/paste them manually from one frame to another. You can create objects at runtime from any frame you like, using the left column in the Create Object dialog. However, this only works with the Create object action, not the Create object by name action.
    Thank you, I didn't know that
    Unfortunately it only works in Frame Events. It doesn't work in Global Events or in Behaviors.

    Back to topic, I use a global active called "gameEngine" and store as behavior all the events that should be in Frame Events. Also I copy from a template frame called "assets" all the global objects that are used in the level (in each frame). So a level frame contains the level layout, the "gameEngine", and I manually copy other needed objects like PMO etc.
    It would help a lot if I could create objects from other frames using behaviors.
    The downside is that I can't use qualifiers .

    The alternative would be to move the events from "gameEngine" back to the Frame Events, create the assets (PMO, camera etc) dynamically from events, the level layout remains the same, and use qualifiers.
    The downside would be that I have to copy/paste manually the events in each frame. So yeah, best code reuse/ sarcasm.

  3. #13
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,344
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Ah, I'm sorry. You'll need to put str$() around the numbers. So for instance str$(X("Group.Engine")) should work fine Regarding the string, you can use a normal string or a global string as I suggested. The string tokenizer you will only use to load data from a string. If you want me to make an example, I can do that. I haven't look at the other examples that was posted though. They may work just fine for what you want

  4. #14
    Clicker Fusion 2.5 (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    64
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    @Popcorn Sure, that would be helpful! I can look at your example tomorrow and try to learn from it. Thank you!

  5. #15
    Clicker Fusion 2.5 (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    64
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Okay, putting the "str$" before the qualifier worked. But now I'm stuck at the next step.

    Quote Originally Posted by Popcorn View Post
    Finally make an event to add another different delimiter to split each object in the string. Place it above the other event, and add a condition to check if the string is not empty, so it only gets inserted if there allready is at least one object present in the string.
    I'm sorry but I really don't follow you here on what the new event should look like.
    I'm attaching my .mfa so you can look.
    Attached files Attached files

  6. #16
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,344
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Here you go.
    I completely messed up your nice organization, so you'll have to redo that. I wasn't able to work on the frame you had before, so I made a new load frame. Just make sure that all Engine objects that are saved actually exists in the load frame, or else nothing will be positioned correctly.
    Attached files Attached files

  7. #17
    Clicker Fusion 2.5 (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    64
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Awesome, this is pretty much perfect! Thank you!

    I cleaned up the engine-frame so that it only contains one object of each and now everything works. I'll attach the final result if anyone else is interested.
    Attached files Attached files

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Object frame to Level Editor on sale right now!
    By PandaExplosion in forum WIP & Released Games & Apps
    Replies: 2
    Last Post: 15th July 2019, 04:07 PM
  2. Level load - Change frame based on position
    By Vetmora in forum Fusion 2.5
    Replies: 6
    Last Post: 14th June 2018, 07:05 AM
  3. Level editor that uses MMF2's own frame editor
    By Shawn in forum File Archive
    Replies: 35
    Last Post: 9th November 2013, 06:34 PM
  4. Tile-based level editor
    By Gabriel in forum File Archive
    Replies: 9
    Last Post: 7th March 2007, 08:17 PM

Posting Permissions

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