User Tag List

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

Thread: REQUEST: Create object from another frame in Global/Behavior events

  1. #1
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module
    AndyH's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,445
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Cool REQUEST: Create object from another frame in Global/Behavior events

    Would normally post to the Bug Tracker but as it is currently down hoping one of the Fusion devs might see this here.


    The one single feature that would have the biggest impact upon making a game over multiple frames would be the ability to create objects from other frames in the Global Event Editor and/or Behavior events. It is possible to do this in the regular frame editor but not the Global or Behaviour events editors.


    Why?
    While creating a game with many frames, you may often want to introduce a new object. Right now, if you add a new object to your game, you have to copy and paste it into all of your frames where you need it and if you have dozens or hundreds of frames this is a chore.

    I use global objects and event behaviours quite a lot so I can make changes to existing objects easily but the final irritation is that I cannot create objects unless they have been added to the frame already.


    New feature
    Add a new feature to allow the Create and/or Create by name actions, from the context of Global Events or Behavior Events, to create an object that exists in another frame.
    eg: the Create by name action could be written as: "Frame 1=>Fred" - this would create the object named "Fred" that exists in a frame called "Frame 1".


    How this would help
    I could, either with the Global Event editor or a Global Active object with a behavior, use actions to create all of the objects I need to have in my games frames.

    When I want to introduce a new object, I'd create it in one frame and then add a single action to my Global event and all frames that use this would now have the object. No additional work required whether I have 10 frames or 100 frames.


    I know your focus is on the next version of Fusion but this new feature would take away a lot of pain in the current version and it would really help.
    Andy H @ ovine.net
    Awful Jokes - a new cartoon every day: http://awful.ovine.net/
    Ovine's games: http://www.ovine.net

  2. #2
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS 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)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    493
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Yes I was actually trying to do it all day from the global event sheet to no avail. It would REALLY help with code reusal

  3. #3
    Clicker Install Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    defisym's Avatar
    Join Date
    Jun 2017
    Location
    Asia
    Posts
    57
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I think "Create object from another application by name" will be useful also.
    e.g. save big animations in another mfa (like library does) and keep main mfa/exe smaller

  4. #4
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,845
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by blurymind View Post
    Yes I was actually trying to do it all day from the global event sheet to no avail. It would REALLY help with code reusal
    The way it's implemented is that the global events (or even frame events) that refer to objects that do not exist in a frame are removed at build time when this frame is built. This allows to reduce the size of the application, to reduce the memory used at runtime, and avoids useless events to be executed in frames that don't need them. Adding all the objects created in global events in every frame would be not efficient at all.

    Maybe a solution would be that when you create an object in the global events, Fusion displays a list of frames in which this object doesn't exist, you select the ones you want, and Fusion automatically adds an instance of this object in those frames, with their "Create at start" option unchecked. This is the easiest solution I think.

    This would work with the Create Object action only, not Create By Name.

  5. #5
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS 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)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    493
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    The way it's implemented is that the global events (or even frame events) that refer to objects that do not exist in a frame are removed at build time when this frame is built. This allows to reduce the size of the application, to reduce the memory used at runtime, and avoids useless events to be executed in frames that don't need them. Adding all the objects created in global events in every frame would be not efficient at all.

    Maybe a solution would be that when you create an object in the global events, Fusion displays a list of frames in which this object doesn't exist, you select the ones you want, and Fusion automatically adds an instance of this object in those frames, with their "Create at start" option unchecked. This is the easiest solution I think.

    This would work with the Create Object action only, not Create By Name.
    Would this require to copy the object to all the frames that need to use it? In that case it defeats the point of creating it from the global event sheet.
    The reason I need this is to teleport a character between frames. In my case I want to also be able to teleport multiple active objects between frames, without the need to copy them to all the frames. My idea was to just create them, but that is probably not the way to approach it in fusion.

    So instead all the active objects I want to move between frames need to be copied to those frames, set to global and unchecked from create on start?
    Then create them whenever they teleport to that frame

  6. #6
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,845
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)
    If we do this, the objects would be added to all the frames you select in that dialog box after you click OK (and their "create on start" option would be automatically unchecked). You would still need to manually add the objects to any new frame you add though, so this would help when you add the Create Object action but wouldn't be a perfect solution.

    For the moment, you have to put in each frame the objects that can be created in this frame.

    The way global events work is quit simple. First, the global events don't know the real objects. They just know object names and types. When Fusion builds the application, for each frame when it includes the global events, it links the object names and types in the global events to real objects that exist in that frame and have the same name and type. If the frame has no object with this name or type, the events are ignored.

    PS: not sure why you say "set to global", the objects don't need to be global. Objects that have the "Global object" option are not stored in a "global objects" set or somethng like that, this is just an option that says that when the object changes in the editor, it should be also modified in the other frames, and it should save it's values between frames at runtime.

  7. #7
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS 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)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    493
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    If we do this, the objects would be added to all the frames you select in that dialog box after you click OK (and their "create on start" option would be automatically unchecked). You would still need to manually add the objects to any new frame you add though, so this would help when you add the Create Object action but wouldn't be a perfect solution.

    For the moment, you have to put in each frame the objects that can be created in this frame.

    The way global events work is quit simple. First, the global events don't know the real objects. They just know object names and types. When Fusion builds the application, for each frame when it includes the global events, it links the object names and types in the global events to real objects that exist in that frame and have the same name and type. If the frame has no object with this name or type, the events are ignored.

    PS: not sure why you say "set to global", the objects don't need to be global. Objects that have the "Global object" option are not stored in a "global objects" set or somethng like that, this is just an option that says that when the object changes in the editor, it should be also modified in the other frames, and it should save it's values between frames at runtime.
    Where is that dialogue box? Is that a feature that is going to be added to 2.5+ or is it something I am missing?

    The biggest problem imo is that frames can not extend other frames. You have to copy stuff across and make sure all frames have the stuff you need them to have. One thing that could help a bit is perhaps treating new frames as something that is created out of a template rather than from scratch. When we see frames, they are like little apps of their own each, where as a lot of users would like to treat them more like the layout of a level- each layout sharing the same behaviours. I guess this is a point for making or using a custom level editor such as tiled in favor of using fusion's frames to do levels.

    Another idea is to somehow be able to automatically propagate a group of objects across all frames somehow - without requiring the user to copy and paste them. If we could use qualifiers to do that - set a frame to automatically import all objects that are marked by specific qualifiers would really really help here too

  8. #8
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,845
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)
    Where is that dialogue box?
    This is what I was talking about here:

    Maybe a solution would be that when you create an object in the global events, Fusion displays a list of frames in which this object doesn't exist, you select the ones you want, and Fusion automatically adds an instance of this object in those frames, with their "Create at start" option unchecked. This is the easiest solution I think.
    It's something I thought we could add but I'm not sure anymore if it's a good idea or just a loss of time with little or no interest.

    The biggest problem imo is that frames can not extend other frames.
    This is a F3 feature, this cannot be added in 2.5 (in 2.5 we can just add workarounds that allow you to copy objects to several frames like the one I was thinking about above).

  9. #9
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS 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)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    493
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    This is what I was talking about here:



    It's something I thought we could add but I'm not sure anymore if it's a good idea or just a loss of time with little or no interest.



    This is a F3 feature, this cannot be added in 2.5 (in 2.5 we can just add workarounds that allow you to copy objects to several frames like the one I was thinking about above).
    It sounds like a workaround that is definitely worth adding! It would be especially helpful in this case! I don't think it would be a waste of time at all
    I would use it for sure, it's better than manually copy and pasting across many frames

    For everyone using global objects it will save alot of time, but also reduce the chance of getting bugs caused by forgetting to paste something in some frame

  10. #10
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)
    elvisish's Avatar
    Join Date
    Oct 2014
    Posts
    616
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    If we do this, the objects would be added to all the frames you select in that dialog box after you click OK (and their "create on start" option would be automatically unchecked). You would still need to manually add the objects to any new frame you add though, so this would help when you add the Create Object action but wouldn't be a perfect solution.
    Perhaps a check when you run the application to see if global events is creating any objects that don't exist in all frames, and it can one-time make them if they're missing?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. global event to create an object
    By aylictal in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 10th September 2012, 07:47 PM
  2. [Request]Confirm message for global object synchronization
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 3rd February 2012, 11:41 AM
  3. [Request] create new objects object
    By motorsk8er in forum Extension Development
    Replies: 9
    Last Post: 4th January 2010, 02:37 AM
  4. [Request] Proxy Object for global qualifiers
    By Roseweave in forum Extension Development
    Replies: 11
    Last Post: 14th June 2008, 09:13 PM
  5. [Request] Create object (Qualifier)
    By RickyRombo in forum Extension Development
    Replies: 7
    Last Post: 18th May 2008, 11:03 PM

Tags for this Thread

Posting Permissions

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