User Tag List

Results 1 to 4 of 4

Thread: [Bug] Unexpected behavior when moving an destroyed object by easing object

  1. #1
    Clicker Install Creator Pro
    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)
    defisym's Avatar
    Join Date
    Jun 2017
    Location
    Asia
    Posts
    105
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Exclamation [Bug] Unexpected behavior when moving an destroyed object by easing object

    if you try to move an destoryed object by easing object (nummeric parameter), the last-created object (or the first-inserted object, Base_1) will be moved uncorrectly.
    Click image for larger version. 

Name:	unknown.png 
Views:	9 
Size:	11.2 KB 
ID:	27587
    Here follows a quick example:
    Easing_Bug.mfa
    it works fine when using another mode, so it seems to be a bug......

    I have read easing object's code on Github:
    Move Object:
    Code:
    short WINAPI DLLExport act_MoveObj(LPRDATA rdPtr, long param1, long param2)
    {
    	LPRO object =	(LPRO)CNC_GetParameter(rdPtr);
    	......
    	if(object == NULL)
    		return 0;
    	......
    }
    Move Object(nummeric parameter):
    Code:
    short WINAPI DLLExport act_MoveObjExplicit(LPRDATA rdPtr, long param1, long param2)
    {
    	int fixed = (int)CNC_GetParameter(rdPtr);
    	LPRO object = LproFromFixed(rdPtr, fixed);
    	......
    	if(object == NULL)
    		return 0;
    	......
    }
    The main difference is the parameter type, the former uses PARAM_OBJECT and the latter uses PARAM_EXPRESSION.
    Maybe the process routine is different, if you input an object's fixed value, PARAM_EXPRESSION won't check if target object exists, just simply return the fixed value on the top of the scoped object list.
    I don't know if it's possible to fix, but at least I can bypass it now by checking the target object exists or not in conditions.
    (After confusing for a long time)

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module
    aa2953b4's Avatar
    Join Date
    Feb 2019
    Posts
    92
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Just add this to your code:
    Code:
    * Upon pressing "Space bar"
    + Number of Target > 0
    	 Easing Object : Move Fixed( "Target" ) using mode=0 functionA=0 functionB=0 to [500,400] using time-mode 0 over 1000 time units

  3. #3
    Clicker Install Creator Pro
    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)
    defisym's Avatar
    Join Date
    Jun 2017
    Location
    Asia
    Posts
    105
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by aa2953b4 View Post
    Just add this to your code:
    Code:
    * Upon pressing "Space bar"
    + Number of Target > 0
    	 Easing Object : Move Fixed( "Target" ) using mode=0 functionA=0 functionB=0 to [500,400] using time-mode 0 over 1000 time units
    Yeah I know how to fix this, but it would be better to add a check routine in extension (or fusion).
    Anyway, thank you all the same.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module
    aa2953b4's Avatar
    Join Date
    Feb 2019
    Posts
    92
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    It seems to be a bug in sdk.

    Proof:
    Code:
    * Upon pressing "1"
    	Target : Destroy
    
    * Upon pressing "Space bar"
    	Special : Set Global Value A to Fixed( "Target" )
    	Special : Start loop "test" 1 times
    
    * On loop "test"
    	 Easing Object : Move Global Value A using mode=0 functionA=0 functionB=0 to [500,400] using time-mode 0 over 1000 time units
    Code:
    LproFromFixed(rdPtr, fixed);
    If fixed is equal to 0 then it take last object from "position order list". (I suppose because I haven't tested the extension code).

    Fix:
    Code:
    short WINAPI DLLExport act_MoveObjExplicit(LPRDATA rdPtr, long param1, long param2)
    {
    	int fixed = (int)CNC_GetParameter(rdPtr);
    	LPRO object = LproFromFixed(rdPtr, fixed);
    	......
    	if(object == NULL || fixed == 0)
    		return 0;
    	......
    }

Similar Threads

  1. Object Event resolving in unexpected order
    By azurie in forum Fusion 2.5
    Replies: 5
    Last Post: 13th October 2017, 12:25 AM
  2. Replies: 12
    Last Post: 23rd December 2016, 10:27 AM
  3. Scaling an Active Object with Easing Object?
    By yuigoto in forum Fusion 2.5
    Replies: 3
    Last Post: 16th December 2015, 10:55 PM
  4. 256 R34 Behavior Bug : Object is not created but its behavior runs anyways
    By Shmuper in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 2nd March 2013, 08:15 AM
  5. [BUG/Unexpected Behaviour] NOT Overlapping an object
    By netninja in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 26th April 2012, 08:15 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
  •