User Tag List

Results 1 to 8 of 8

Thread: Mouse Power

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Sep 2011
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mouse Power

    Does anyone know a simple way to give the mouse different amounts of power depending on how fast the player moves the mouse? For example the quick strokes for fruit ninja or swinging as hard as you can in spank the monkey.

  2. #2
    Clickteam Clickteam
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,647
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    You could measure the distance moved / time, that would give you a higher value for larger movements in a shorter time

    If you do such calculations, make sure you add a decimal point into the equation somewhere to force MMF to store floating point numbers there, eg distance/time * 1.0

  3. #3
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jan 2010
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am pretty sure I've seen an extension for getting the mouse speed, but right now I can't seem to find it. If there isn't any, I would be suprised :P

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can do this in 2 conditions

    Use the Advanced Direction Object ( you can do without but it makes it easier )
    Create 3 Counters, named "MouseMemoryX" and "MouseMemoryY" and "MouseSpeed"
    ...
    In the Event Editor do:

    Start of frame
    -->
    Set 'MouseMemoryX' to Xmouse
    Set 'MouseMemoryY' to Ymouse

    If 'MouseMemoryX' is different than Xmouse
    OR ( logical )
    If 'MouseMemoryY' is different than Ymouse
    -->
    Set 'MouseSpeed' to ( Advanced Direction Object ) distance between 'MouseMemoryX', 'MouseMemoryY' and 'Xmouse', 'Ymouse'
    Set 'MouseMemoryX' to 'Xmouse'
    Set 'MouseMemoryY' to 'Ymouse'

    Tataaa!

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,862
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Very nice Kingcool. If you wouldn't mind,.can you upload the mfa please!

  6. #6
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I really didnt make an .mfa
    But i made one now.
    ...
    Small uppdate, so that the MouseSpeed is set to 0 when it isnt moving

    In the Event Editor do:

    Start of frame
    -->
    Set 'MouseMemoryX' to Xmouse
    Set 'MouseMemoryY' to Ymouse

    If 'MouseMemoryX' = 'MouseMemoryX'
    + If 'MouseMemoryY' = 'MouseMemoryY'
    -->
    Set 'MouseSpeed' to 0

    If 'MouseMemoryX' is different than Xmouse
    OR ( logical )
    If 'MouseMemoryY' is different than Ymouse
    -->
    Set 'MouseSpeed' to ( Advanced Direction Object ) distance between 'MouseMemoryX', 'MouseMemoryY' and 'Xmouse', 'Ymouse'
    Set 'MouseMemoryX' to 'Xmouse'
    Set 'MouseMemoryY' to 'Ymouse'
    Attached files Attached files

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wait, this is better!
    ...
    In the Event Editor do:

    Start of frame
    -->
    Set 'MouseMemoryX' to Xmouse
    Set 'MouseMemoryY' to Ymouse

    Allways
    -->
    Set 'MouseSpeed' to ( Advanced Direction Object ) distance between 'MouseMemoryX', 'MouseMemoryY' and 'Xmouse', 'Ymouse'

    If 'MouseMemoryX' is different than Xmouse
    OR ( logical )
    If 'MouseMemoryY' is different than Ymouse
    -->
    Set 'MouseMemoryX' to 'Xmouse'
    Set 'MouseMemoryY' to 'Ymouse'
    Attached files Attached files

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,862
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Kingcool,..thanks man. Great example and much appreciated.

Similar Threads

  1. To the power of?
    By ChrisBurrows in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 29th April 2012, 02:29 PM
  2. power of two survey
    By solarstorm in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 14th May 2011, 09:10 AM
  3. How do I do something to another power?
    By Karl in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 8th November 2009, 10:14 PM
  4. The Power of MMF2?
    By Arashimaru in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 16th May 2007, 09:16 AM
  5. Mouse click events runs faster when mouse moves
    By chrilley in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 2nd February 2007, 03:54 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
  •