User Tag List

Results 1 to 6 of 6

Thread: CF2.5+ loops and child event

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Feb 2019
    Posts
    16
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    CF2.5+ loops and child event

    If I call loops somewhere in the code, will the interpretation embedded in the child's event be made only after the parent's condition is true? Especially when it comes to extensions and triggered events.

  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
    1,960
    Mentioned
    51 Post(s)
    Tagged
    0 Thread(s)
    Pretty sure it wouldn't work in the first place. You can't put green conditions in child events. And "on loop" is a green condition.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Feb 2019
    Posts
    16
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It is a shame because they should act paying attention to their parents. Most of my code is based on loops. If it does not work like this then I do not even intend to buy CF25+. Thanks for the information, I'm replacing nested events with loops anyway. They seemed more transparent, but if they do not work that way then they are useless. Triggered events are very important for advanced users of CF.

  4. #4
    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
    131
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Something that might be worthwhile considering depending on how many loops you use - nesting a loop inside of a child event will impact performance less than using otherwise multiple lines of loops.

    E.g.


    On the left, the fast loop "moveBullet" is evaluated multiple times

    On the right (with child events), the loop "moveBullet" is evaluated only once

    Depending on how many loops you're using, how often you're using them per frame tick, and whether you're activating/deactiving sections of code that contain the loops, you may see some performance gains with child events for fast loops over separate lines for each

  5. #5
    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
    1,960
    Mentioned
    51 Post(s)
    Tagged
    0 Thread(s)
    I strongly recommend you consider buying 2.5+ anyway. Child events are just a small part of it. It has dozens of other features that are fantastic improvements.

    It is a shame because they should act paying attention to their parents.
    I'm not sure what you mean by this. Do you mean that you want child events to only trigger if the parent event is true? Because that's how it works.

    Or do you mean that you want every child event to check its parent's conditions, so that if a parent has 5 children, Fusion checks the parent conditions 5 times? It doesn't work this way, but that's a good thing, because it saves performance to only check parent conditions once.

    Not being able to place green "on loop" conditions in children is a separate issue. It makes sense in a lot of cases, because many green conditions (eg. Start of Frame, Collides with) are checked before all other events, so it would create a logical paradox to have them in child events (a child event that contains Collides with is only checked after a parent event is checked....but Collides with is checked before the parent event is checked).

    There are some green conditions that I think would still make sense to be allowed, like never or upon pressing a key. I think an argument could be made that on loop events should be allowed, but I can also see reasons why they shouldn't be. For one, it would force Fusion to check the parent condition multiple times (once in the normal events, and then whenever the loop is called elsewhere), when part of the appeal of child conditions is that their parents are only supposed to be checked once

  6. #6
    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
    581
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Volnaiskra View Post
    Or do you mean that you want every child event to check its parent's conditions, so that if a parent has 5 children, Fusion checks the parent conditions 5 times? It doesn't work this way, but that's a good thing, because it saves performance to only check parent conditions once.
    But this is the way I expected it to work, and it would be nice to have the option to use have child events work this way *as well* as the way they currently do. I currently have no use for child events as every situation I'd want to use them in would require them checking the parent off each time, otherwise I'm just doing as always: reusing the same conditions again and again in duplicate events with one condition changed.

Similar Threads

  1. Child event not working as intended?
    By elvisish in forum Fusion 2.5
    Replies: 18
    Last Post: 6th April 2019, 10:55 AM
  2. Fusion 2.5+ Quickly Move to Child Event?
    By CruddyBuddy in forum Fusion 2.5
    Replies: 2
    Last Post: 3rd April 2019, 04:11 PM
  3. One Action when event loops
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 16
    Last Post: 12th June 2009, 03:21 AM
  4. Two loops controlling 1 event.
    By BrandonC in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 21st January 2008, 09:37 AM
  5. The 'Only one action when event loops'...
    By Tiny in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 25th July 2006, 02:26 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
  •