User Tag List

Results 1 to 3 of 3

Thread: Old method: why "Xmouse/32*32" works?

  1. #1
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jun 2006
    Posts
    903
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Old method: why "Xmouse/32*32" works?

    I have found old file with this method used to snap object to pseudo grid.

    Im just curious why does it work? Thanks

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: Old method: why "Xmouse/32*32" works?

    Because MMF use integers by default. Integers doesn't have decimals, and that's why it will snap.

    If you include a decimal in the calculation, the values are converted to float values, which allows decimals.

    Integers:

    35 / 32 = 1
    78 / 32 = 2

    When we multiply again with 32 we get the "snap".

    1 * 32 = 32
    2 * 32 = 64

    And that's why:

    35 / 32 * 32 = 32
    78 / 32 * 32 = 64


    Float:

    35 / 32.0 = 1.09
    78 / 32.0 = 2.44

    If wwe multiply with 32 now, it will ofcourse not snap to the grid.

  3. #3
    Clicker Multimedia Fusion 2
    Algul's Avatar
    Join Date
    Feb 2008
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Old method: why "Xmouse/32*32" works?

    Try Xmouse/32.0*32 and it will not snap.
    215/32 = 6
    215/32.0 = 6.71875

Similar Threads

  1. Shader: "Under Water" dosen't works ...
    By flechenoir in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 27th May 2013, 12:36 AM
  2. [REQUEST] Realtime "Grab desktop" object that works as a Picture?
    By NaitorStudios in forum Extension Development
    Replies: 4
    Last Post: 23rd May 2013, 09:56 PM
  3. INI Problem > Works only if "Create INI file in Application Data folder" is checked.
    By Hawanna in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th June 2012, 05:47 PM
  4. "Long" running method
    By Keith in forum Extension Development
    Replies: 7
    Last Post: 11th January 2012, 12:42 PM
  5. Anyone know whether "Taskbar.cox" extension works?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 3rd June 2010, 10:06 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
  •