User Tag List

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

Thread: Correct way of doing child events in order

  1. #1
    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
    615
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Correct way of doing child events in order

    Here's the non-child version:
    nonchild.PNG
    And here's the child version:
    childverz.PNG

    Should I be using Always to place these two events beneath the other two? I imagine it would be the same as just having them in the same event, but being able to keep the ordering correct after the child events.

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,842
    Mentioned
    83 Post(s)
    Tagged
    2 Thread(s)
    What happens when the X coordinates of both objects are identical?

    In the events above you test if X1 > X2 and X1 < X2, you don't test the case X1 = X2. So you can't add a Always otherwise its actions wil be executed when X1 = X2.

    Unless you made a typo and you wanted to test X1 >= X2 for example (in this case, i.e. if you replace > by >=, all cases are covered and you can move the events to a Always).

  3. #3
    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
    615
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    What happens when the X coordinates of both objects are identical?

    In the events above you test if X1 > X2 and X1 < X2, you don't test the case X1 = X2. So you can't add a Always otherwise its actions wil be executed when X1 = X2.

    Unless you made a typo and you wanted to test X1 >= X2 for example (in this case, i.e. if you replace > by >=, all cases are covered and you can move the events to a Always).
    Good point, it's setting the facing direction of the enemy towards the player, and yeah it would cause an issue if it's exactly halfway between positions. Is the first action working differently in the child-event version, or is "Always" technically the correct way of "childifying" a double condition by specifying the execution order, as in the first example?

  4. #4
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,842
    Mentioned
    83 Post(s)
    Tagged
    2 Thread(s)
    Your examples work differently in the case the X coordinates are identical.

    If you don't want the Attacking and Away flags to be set when the X coordinates are identical, then you have to use the first example, not the second one.

    Think about child events as a separate function edited in a separate editor (the only difference is the objects that are pre-selected by the parent conditions).

  5. #5
    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
    615
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    Your examples work differently in the case the X coordinates are identical.

    If you don't want the Attacking and Away flags to be set when the X coordinates are identical, then you have to use the first example, not the second one.

    Think about child events as a separate function edited in a separate editor (the only difference is the objects that are pre-selected by the parent conditions).
    Ahh because the first checks on both if "away" is on, and since its been set by the first event, it's off on the second; whereas child just does both, only checking is "Away" is on during the parent. I'd still love the possibility of inclusive checks for child events, as you have with Or and Or logical; it would make these situations a lot easier to manage.

  6. #6
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,842
    Mentioned
    83 Post(s)
    Tagged
    2 Thread(s)
    It's not the problem I was talking about, though it's another one I didn't see. I was saying that if X1=X2, in your first example Attacking and Away are not set to ON, in your second example they are set to ON. Just take the possible cases (3 in this case: X1<X2, X1=X2, X1>X2) and write what conditions and actions are executed, you'll see the differences between both versions.

  7. #7
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,842
    Mentioned
    83 Post(s)
    Tagged
    2 Thread(s)
    PS: sorry if what I say is not very clear. From a developer point of view it's quite obvious, but from a non-developer point of view it might be a bit more difficult. When you make child events you probably have to think a bit more about the logic of execution of the events, it's probably more "abstract" than the linear coding style with duplicated conditions.

  8. #8
    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
    615
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    PS: sorry if what I say is not very clear. From a developer point of view it's quite obvious, but from a non-developer point of view it might be a bit more difficult. When you make child events you probably have to think a bit more about the logic of execution of the events, it's probably more "abstract" than the linear coding style with duplicated conditions.
    Yes, I'm finding it is taking some time to adapt to, and in most cases I think I was expecting child events to be used to reduce the amount of events needed, rather than using them to trigger several events if the parent event is true. If it's ever on the roadmap to allow for child events to work in parallel rather than just serial, I think they'd have even more versatility.

  9. #9
    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,077
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)
    I think child events aren't meant to reduce events, but are meant to reduce conditions.

  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
    615
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Volnaiskra View Post
    I think child events aren't meant to reduce events, but are meant to reduce conditions.
    I'm not sure but, don't conditions and events go hand in hand? I can't think of an example where one could be reduced without the other ?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. 2.5+ Parent & Child events: When to use it?
    By Fuuriokun in forum Fusion 2.5
    Replies: 14
    Last Post: 24th April 2019, 11:05 AM
  2. Order of Events for Loops
    By Ethan in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 15th January 2013, 05:33 PM
  3. Fastloops/Threading/Order of Events
    By netninja in forum Lacewing
    Replies: 11
    Last Post: 22nd January 2012, 11:42 PM
  4. In what order are events handeled?
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 5th December 2011, 02:41 PM
  5. events don't run in the expected order
    By keokeo in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 24th November 2011, 07:30 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
  •