User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 26

Thread: Child event not working as intended?

  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
    616
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)

    Child event not working as intended?

    Just tried for my first child today, and it didn't quite work as expected:

    This allows for diagonal movement.
    child.jpg

    This doesn't allow for diagonal movement.
    nochild.jpg

    How can I use child events and make sure it never moves diagonally, as the non-child version?

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,847
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)
    Just had a quick look, in the version without child events, when you set Horiz to 1 the other lines are no longer executed as Horiz is no longer 0. In the version with child events, they are executed as you don't test if Horiz = 0 anymore.

  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
    616
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    Just had a quick look, in the version without child events, when you set Horiz to 1 the other lines are no longer executed as Horiz is no longer 0. In the version with child events, they are executed as you don't test if Horiz = 0 anymore.
    Why wouldn't it be testing Horiz = 0 anymore? The child events should be tested against both parent events if true?

    I hoped this might work, but it still goes diagonally:
    diag3.jpg

  4. #4
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,847
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)
    The parent events are evaluated only once at the beginning of the block. After they are evaluated, if they are all true, they the child events are executed and for each child event the objects that were selected in the parent conditions are selected again.

  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
    616
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    The parent events are evaluated only once at the beginning of the block. After they are evaluated, if they are all true, they the child events are executed and for each child event the objects that were selected in the parent conditions are selected again.
    Is there a way of getting it to work the same way using child events? I was expecting child events to work the same as nested if statements.

  6. #6
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,847
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)
    It's exactly how they work

    Code:
    If ( horiz == 0 && vert == 0 )
    {
    	if ( xxx )
    		horiz = -1;
    	if ( yyy )
    		horiz = -1;
    	if ( zzz )
    		vert = -1;
    	if ( kkk )
    		vert = -1;
    }
    is not at all equal to:

    Code:
    	if ( horiz == 0 && vert == 0 && xxx )
    		horiz = -1;
    	if ( horiz == 0 && vert == 0 && yyy )
    		horiz = -1;
    	if ( horiz == 0 && vert == 0 && zzz )
    		vert = -1;
    	if ( horiz == 0 && vert == 0 && kkk )
    		vert = -1;
    Hopefully you see the difference.

    (unless it's too late here and I missed something...)

  7. #7
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,847
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)
    EDIT: modified my example it was wrong.

  8. #8
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,847
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)
    EDIT: modifying my example...

  9. #9
    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
    616
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    Hmm, actually I'm wrong it's identical, but in your example it probably depends on the object selection.
    I'm not sure how the objects could be selected differently, it's just checking an alt value?

  10. #10
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,847
    Mentioned
    84 Post(s)
    Tagged
    2 Thread(s)
    OK, modified the source code, my first example was wrong.

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. 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
  2. Qualifier event not working as intended, why?
    By contra in forum Fusion 2.5
    Replies: 5
    Last Post: 28th September 2018, 11:48 PM
  3. UWP Multi touch not working as intended
    By KABAR in forum Universal Windows Platform Module 2.5
    Replies: 8
    Last Post: 7th February 2017, 03:27 PM
  4. Replies: 2
    Last Post: 25th January 2017, 02:03 AM
  5. Apply impulse does not work as intended
    By salmjak in forum Android Export Module 2.5
    Replies: 8
    Last Post: 4th April 2014, 07:04 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
  •