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

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • 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 @ Please login to see this link. - Please login to see this link.
    Retro Gaming @ Please login to see this link.

  • 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

    Please login to see this link.
    Please login to see this link.

  • 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.

  • 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

    Please login to see this link.
    Please login to see this link.

  • 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.

  • 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

    Please login to see this link.
    Please login to see this link.

  • Quote

    Where is that dialogue box?

    This is what I was talking about here:

    Quote

    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.

    Quote

    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).

  • 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

    Please login to see this link.
    Please login to see this link.

  • 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?

    Please login to see this link.

    Please login to see this link.

    Please login to see this link.

  • Quote

    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

    You would still have to manually copy paste the objects if you add new frames after adding the Create action, this will just move the problem to a later date. It should be either entirely manual, or entirely automatic. That's why I say it's probably not a good idea. Maybe we can find a better 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?

    Often you don't want all these objects to be created in all the frames. If the object doesn't exist in the frame this will reduce the events that are executed in that frame and the memory used by that frame. Better performances. The best workaround IMHO is something that let you choose the frames where the objects have to be copied to.

  • You would still have to manually copy paste the objects if you add new frames after adding the Create action, this will just move the problem to a later date. It should be either entirely manual, or entirely automatic. That's why I say it's probably not a good idea. Maybe we can find a better solution.


    Often you don't want all these objects to be created in all the frames. If the object doesn't exist in the frame this will reduce the events that are executed in that frame and the memory used by that frame. Better performances. The best workaround IMHO is something that let you choose the frames where the objects have to be copied to.

    That's true, but for frames that are added after the create event has been made, could there be an way to re-run the option to choose which frames the objects are created?

    Please login to see this link.

    Please login to see this link.

    Please login to see this link.

  • An option to copy across would help but yes, not a great solution. In that case a button on the object in the properties window called "Create in missing frames" would work better because you could click that to tell it to create an instance in all frames that it is missing from.

    Another suggestion could be to add a new object property called "Create in all frames" that if ticked would be added to each frame in the game IF an object of the same name and type does not exist there already. I guess you'd need to maintain a list of objects that had this ticked, but that could help and a bit of automation is always preferable than having to click a button on each object yourself as you would have to with the first idea.

    I could live with either of the above in 2.5, it's an improvement on this problem we have. It doesn't solve the ability to create at runtime, either from the global event editor (remember we can choose which frames have a global event editor) or, more useful, from an event behavior. Maybe the answer to that will be Fusion 3, but I would be eternally grateful if you can do anything that helps in this version :)

    Andy H @ Please login to see this link. - Please login to see this link.
    Retro Gaming @ Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!