User Tag List

Page 3 of 3 FirstFirst 1 2 3
Results 21 to 27 of 27

Thread: Why do you have to split actions into multiple lines sometimes for things to work?

  1. #21
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,072
    Mentioned
    171 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by BartekB View Post

    This is very important, because when fusion jumps to a new event, this "current event number" increments, invalidating all selections that were made beforehand but also validating all selections done in the child event within the parent after it jumps back. That makes functions like fastloops and any other actions that jump to a new event dangerous, and cause the very two problems you have mentioned:
    - The new event/condition, like fastloops, do not inherit the selection from the event that called it/the parent. (Which in my opinion, is good)
    - When fusion eventually comes back to the parent event, you have (almost) absolutely no idea what modifications have been made to the selection and result in undefined behaviour for the rest of the actions after the loop. (This is what caused for the original post in this thread)
    The people referring to Parent / Child events are referring to the function introduced in Fusion 2.5+ where when a primary condition (parent) is true - you can have multiple options (children) under it.

    However, this is not part of the original post because no parent / child events are present.

    Perhaps you're referring to the primary event that calls the loop as the parent and the actual loop execution as the child, but then it would probably be better to not use the terminology parent / child events.

    Further I think that Clickteam participants in this thread are referring to Fusion's internal selection process as scoping.
    For me, scoping is isolating or selecting a list of objects, out of a set of objects, and no scoping takes place when all objects are selected - but I guess that's just semantics.

    What you're saying is that Fusion doesn't know what changes were made, and therefore breaks. However, the initial objects were not changed, they're still there - there was no modification.

    Index 1 - Object A
    Index 2 - Object A
    Index 3 - Object A
    Index 4 - Object A
    Index 5 - Object A

    Mark Index 5 for deletion - run the loop that creates more Object A

    Index 6 - Object A
    Index 7 - Object A
    Index 8 - Object A
    Index 9 - Object A
    Index 10 - Object A

    When Fusion comes back to the destroy event it now marks index 10 for deletion and then stops. If, Fusion failed to add Index 6 - 10 to the list, i.e. it does not know what modifications were made, it would then still correctly have
    deleted Index 1 to 5. But it deleted Index 10 and then stopped.


    Quote Originally Posted by BartekB View Post

    Objects that are destroyed actually still linger in the frame until all events finish. Then they are finally destroyed before the game frame renders. So, the "Destroy" action really marks objects for removal and doesn't immediately do it.
    This is incorrect. There were no destroy events in that .mfa - it was a loop creating objects and an overlapping condition that had to stop the loop. It was working every 2nd time and your explanation doesn't address the issue at all.

  2. #22
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    650
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Janette5 View Post
    This is incorrect. There were no destroy events in that .mfa - it was a loop creating objects and an overlapping condition that had to stop the loop. It was working every 2nd time and your explanation doesn't address the issue at all.
    Both Loopquestion_01.mfa and Loopquestion_02.mfa files had Destroy actions, look at events 2, 3 and/or 4.





    Here is an example which shows you that two objects still exist even after calling Destroy, until all events run: MarkedForRemoval.mfa

    Quote Originally Posted by Janette5 View Post
    The people referring to Parent / Child events are referring to the function introduced in Fusion 2.5+ where when a primary condition (parent) is true - you can have multiple options (children) under it.
    No, what I was referring to is the caller event (one with the fastloop action) and the callee (one with the fastloop condition), you are right. I should edit my post earlier to avoid confusion with 2.5+ child events.

    The fusion internal discussion was for more advanced users that wondered about why fastloops behaved this way. If you are curious about object selection, SDKs are available for download and you can check some of the Fusion structures. But again, aimed for advanced users (those who build extensions).
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

  3. #23
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,072
    Mentioned
    171 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by BartekB View Post
    Both Loopquestion_01.mfa and Loopquestion_02.mfa files had Destroy actions, look at events 2, 3 and/or 4.
    Thanks, I see now. I forgot about the first section, I was only looking at the loops and didn't see how it related.

    Then an additional fix would be to make them invisible first & then destroy them and then test for visibility with the overlapping condition.

  4. #24
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    650
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Janette5 View Post
    Thanks, I see now. I forgot about the first section, I was only looking at the loops and didn't see how it related.

    Then an additional fix would be to make them invisible first & then destroy them and then test for visibility with the overlapping condition.
    I'm not sure why you completely disregarded my explanation so quickly without checking but yes, this comes back around to what I originally said, either visibility or flags will do fine (unless you're working with invisible hitboxes):

    Quote Originally Posted by BartekB View Post
    If you use one of the flags and set it on when you use "Destroy", you will be able to filter out objects that are marked for removal before you do the overlap condition in event 8, as those objects are still capable of overlapping and therefore stop the loop prematurely.
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

  5. #25
    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,487
    Mentioned
    129 Post(s)
    Tagged
    0 Thread(s)
    Thanks very much for taking the time to explain all that, @BartekB . I appreciate it. I'm a visual thinker, so yes images probably would have helped (my IQ seems to go up in the presence of visual metaphors or images... even more if crayons are involved ) but I think I followed it.

    I'm still unclear though why the very last pear example in my post works the way it does. You say that inserting a forEach condition into the fastloop helps to force similar scoping in the fastloop event. That makes sense, but in that final example, there's no forEach condition in the fastloop event at all, and yet the pears still tilt correctly.

    I understand why, in the second-last example, the fastloop 'breaks' the scoping in the subsequent action of event #2. You have helped me understand that. However, what I don't understand is why, in the final example, it *doesn't* break the scoping in event #3 (the pears still tilt correctly).

    The only reason I can think of is that event #3 inherits its selection list from event #1, not from #2. So even when event #4 invalidates the selection for #2, #3 is unaffected because it re-reads the selection from #1 somehow. Though that doesn't sound right, because it would suggest that there are multiple selection lists to read from, but there's only one.

    To put it another way, if Fusion knows how to survive the scope-breaking of the fastloop in the last case, why doesn't it use that strategy in the second-last case?

  6. #26
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    650
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    @Volnaiskra Because you have split the actions into two events.
    Selection does not phase through events, it is invalidated every time a new event starts. The conditions then re-select the objects before actions begin to execute.

    In the last example, event #3 works like event #2 weren't even there. The issue in the second last example is that Fusion does not realise the selection can be even modified while actions are being executed, so it naively goes through each action without batting an eye. The last example does not have this issue because selection is invalidated before the fastloop action can do any harm.

    For each loops work like this:
    - When action "Start loop for each one" is came across, Fusion calls all events starting with "On each one of". This is normal triggered or called behaviour, also works like fastloops.
    - When the events start, "On each one of" condition queries for which object to select, this is a read-only process and is not part of the selection list, the selection list is modified based on the query.

    Here's also an attempt at trying to explain this with shapes representing the selection list's state (modified by each event):


    EDIT: Why do I refer to the selection list being invalidated, rather than just cleared? Because it's an optimisation, Fusion only increments one value rather than resetting the list of selected objects because that would be extremely slow. So even if the list got invalidated, other data stays the same and actions may interpret this resulting with undefined behaviour.
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

  7. #27
    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,487
    Mentioned
    129 Post(s)
    Tagged
    0 Thread(s)
    Thanks! I understand how it works a lot better now.

Page 3 of 3 FirstFirst 1 2 3

Similar Threads

  1. Lines connecting multiple objects
    By Mr_A in forum Fusion 2.5
    Replies: 4
    Last Post: 20th March 2016, 08:16 PM
  2. Use same button for multiple actions?
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 4th January 2013, 03:55 AM
  3. Chart Object, multiple lines?
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 21st August 2012, 10:09 AM
  4. Adding multiple lines at once
    By weka in forum SWF/Flash Export Module Version 2.0
    Replies: 6
    Last Post: 10th May 2010, 10:17 PM
  5. Phizix: Multiple Lines in Body
    By Jaffob in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 12th November 2008, 09:21 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
  •