User Tag List

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

Thread: Help moving a object with the mouse

  1. #1
    No Products Registered

    Join Date
    Nov 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help moving a object with the mouse

    Hello,

    I need some help on making an object follow the mouse pointer.

    I want to be able to left click on an object and it will follow the mouse pointer. Upon a second left click or right click of the mouse it will stop following the mouse pointer.

    Thanks,

    Rick

  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: Help moving a object with the mouse

    * User clicks with Left Mouse Button on Active
    - Active: add 1 to Alterable Value A

    * Active: Alterable value A = 1
    - Active: set Xpos to Xmouse
    - Active: set Ypos to Ymouse

    * Active: Alterable value A = 2
    - Active: set Alterable Value A to 0

  3. #3
    No Products Registered

    Join Date
    Mar 2007
    Location
    San Diego
    Posts
    280
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help moving a object with the mouse

    An alternative to popcorn's method:

    first change the hotspot of the object to the center

    Then add the following events:

    +User clicks with left mouse button on active
    OR
    +User clicks with right mouse button on active
    -Active: Toggle internal flag 0

    +Active: internal flag 0 is set on
    -Active: set X position to XMouse
    -Active: set Y position to YMouse

  4. #4
    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: Help moving a object with the mouse

    You're sure about that, Ketchup? Will this also deselect the object on a new click? =)

  5. #5
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall 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)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Help moving a object with the mouse

    You're sure about that, Ketchup? Will this also deselect the object on a new click? =)
    Collision mask permitting, yes it will. Toggle basically alternates the flag, so if it is off it sets to on and if it is on it sets to off.
    .:::.Joshtek.:::.

  6. #6
    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: Help moving a object with the mouse

    Ahh thanks, I didn't know that
    Hm, have that toggle thing always been there? Haven't noticed it before, lol

  7. #7
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall 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)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Help moving a object with the mouse

    Quote Originally Posted by Popcorn
    Ahh thanks, I didn't know that
    Hm, have that toggle thing always been there? Haven't noticed it before, lol
    The toggle feature has been around since TGF. It was not in KNP because KNP did not have flags (only alterable value A, B and C).
    .:::.Joshtek.:::.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    SoftWarewolf's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    941
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Help moving a object with the mouse

    Quote Originally Posted by Ketchup
    first change the hotspot of the object to the center
    theres no way to change hotspot position with event is it? and if you were to pick up a key or something then hotspot would be better in the center of the hole than middle of object..

  9. #9
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall 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)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Help moving a object with the mouse

    You could always move the object relative to where you clicked on it:

    * User clicks with left button on (Active)
    + OR
    + User clicks with right button on (Active)
    - (Active) : Toggle internal flag 0
    - (Active) : Set Alterable Value A to X( "Active" )-XMouse
    - (Active) : Set Alterable Value B to Y( "Active" )-YMouse

    * (Active) : internal flag 0 is on
    - (Active) : Set X position to XMouse+Alterable Value A( "Active" )
    - (Active) : Set Y position to YMouse+Alterable Value B( "Active" )
    .:::.Joshtek.:::.

  10. #10
    Clicker Multimedia Fusion 2iOS Export Module

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

    Re: Help moving a object with the mouse

    Here's my way of making it true drag and simulate moving the hotspot without the object jumping to the mouse.

    On click on the object
    +and flag 0 is off

    -Set active's value A to mouseX - active's X pos
    -Set active's value B to mouseY - active's Y pos

    On click the mouse
    +and flag 0 is on

    -set off flag 0

    While flag 0 is on
    -Set active's X pos to mouseX - active's value A
    -Set active's Y pos to mouseY - active's value B

    Download this:

    http://bibin.teatons.com/Downloads/DragMe.zip

    I made it in KNP.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Moving an object with the mouse
    By mag_news in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 4th May 2011, 11:52 PM
  2. Moving a mouse controled object in a maze
    By DEKE15 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 6th February 2010, 06:59 PM
  3. Monitor mouse clicks while moving object with mous
    By rogiedodgie32 in forum The Games Factory 2 - Technical Support
    Replies: 5
    Last Post: 26th January 2010, 11:44 AM
  4. set dir in mouse moving
    By melnet in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 16th October 2008, 06:20 AM
  5. Moving Object Along Path With Mouse
    By drnebula in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th January 2007, 01:24 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
  •