User Tag List

Results 1 to 5 of 5

Thread: Any way to change the order of global events, frame events and behaviours?

  1. #1
    Clicker Fusion 2.5 Mac
    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)

    Join Date
    Jan 2015
    Location
    Australia
    Posts
    229
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)

    Any way to change the order of global events, frame events and behaviours?

    Normally when you create something in Fusion the order of events is:

    1. Frame Events
    2. Global Events
    3. Object Behaviours

    Is there any way to change this order so that Fusion executes the Global events first?

    -----------------

    Little bit of background info on the reason for the question: whenever I add controller support or multiple inputs for the same function to a game, I tend to filter all the inputs down to an Active object with Alt vals for each input.
    E.g. While the player is pressing Right DPAD/Right Arrow/Thumbstick X axis passes a threshold, the Alt val for "right pressed" is set to a value >0, and each frame this ticks down back to 0

    This makes testing for player input a bit easier since I only have to test one object each time instead of multiple objects, and has the added benefit of avoiding some issues like a player moving twice as fast because they've pressed *both* the right arrow key and button on a gamepad/joystick

    Normally I would insert the code for checking inputs at the beginning of the frame's events, and the code for 'ticking down' the input at the end of the frame events - which is great if the game happens across a single frame but if you've got multiple frames it requires a bit of copying and pasting, and putting these events in global events and having them tested first would make it a bit easier

  2. #2
    Clicker 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)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,582
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    I just did a quick test, and it looks like events are executed in the following order:

    Frame *green* events
    Global *green events
    Frame regular events
    Global regular events

    In other words, if you put an event containing a green condition in your global events, it *will* be executed before frame events (but not before the frame's green events).

    This is of limited use since there aren't many green conditions (though if you got clever you could possibly make it work using the green "pressed any key" condition in your case, though you'd still have a problem with gamepad events.

    I agree that having this functionality would be very useful, for the reason you describe, but I can think of some other uses too.

    @Yves , would it be possible to give us a new green condition that functioned essentially as a green version of "always"? It could be called something like "Start of Events" or "always (immediate)" and would push that event to the front of the queue, perhaps also before all other green conditions. (though frame green events would continue to be executed before global green events, including this one).

  3. #3
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,047
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)
    I'll check if we can add order options.

    "Green always": the green conditions can be called at any time, either from other events, or during collision tests, or when Windows sends an event, etc, they aren't called all in a row, so I'm not sure where a green Always condition should be called from. And it would be a bit confusing. But I see your point.

  4. #4
    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
    824
    Mentioned
    19 Post(s)
    Tagged
    0 Thread(s)
    I think now global events can and will be used for entire engine work, there could probably be some options for calling events in specific order. Being able to reuse events over all frames is incredibly useful and it would be really nice to be able to specify how and when certain events or groups are run, especially if frame specific events or groups are needed.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    660
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    I just tend to keep my Always events toward the top of the code so that they get executed first, but in terms of keeping things organized I can see where green Always events would come in handy, just so they don't fall out of Groups and such.

Similar Threads

  1. Jumping To A Frame In Global Events Using The Options Menu
    By Kimera in forum Android Export Module 2.5
    Replies: 9
    Last Post: 2nd May 2019, 02:34 PM
  2. Reorganize Common Events into Global Events
    By FinalSpecimen in forum Fusion 2.5
    Replies: 2
    Last Post: 24th September 2015, 08:16 PM
  3. Running frame from global events is annoying
    By dustingunn in forum Fusion 2.5
    Replies: 2
    Last Post: 7th February 2014, 03:43 PM
  4. Global events or Frame events first?
    By Digitalic in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 25th June 2010, 08:18 PM
  5. Group of events & global events - performance?
    By Leander in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 9th June 2010, 03:00 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
  •