User Tag List

Results 1 to 5 of 5

Thread: Defining object zone

  1. #1
    No Products Registered

    Join Date
    Jul 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Defining object zone

    Hi, I just recently started learning MMF2 and I am trying to create a game of drag and drop. So far I have been able to do dragging and dropping for an object. The problem is that the mouse pointer has to be exactly on top of the object when I drag it and when I move too fast, the object is dropped right away. The expression that I used is:

    Condition:
    Mouse pointer is over OBJECT X
    + Repeat while left mouse-key is pressed

    Action:
    Set X Position to XMouse
    Set Y Position to YMouse

    My question is that how can I hold the object and drop it only when I release the mouse button. I appreciate the answer!

  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: Defining object zone

    Hey, and welcome!

    Here is a method that does what you want AND makes sure the object doesn't reposition itself to the mouse, but remains its position when you click on it.

    * user clicks with left button on OBJECT
    - OBJECT: set alterable value A to xposition of OBJECT - XMOUSE
    - OBJECT: set alterable value B to yposition of OBJECT - YMOUSE
    - OBJECT: set flag 0 on

    * [NEGATE] Repeat while lefy mouse key is pressed
    - OBJECT: set flag 0 off

    * OBJECT: flag 0 is on
    - OBJECT: set xposition to alterable value A + xmouse
    - OBJECT: set yposition to alterable value B + ymouse


    To negate a condition, right click the condition and select Negate.

  3. #3
    No Products Registered

    Join Date
    Jul 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Defining object zone

    Thank you so much for the answer!

  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: Defining object zone

    No problem, Glorius Intruder!

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Defining object zone

    A while ago, I made a rather interesting example file of how to drag active objects. You may find it useful, now or in the future.

    Active Dragging Examples

    Enjoy!
    Jaffob

Similar Threads

  1. Defining Areas in Level
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 8th July 2011, 02:31 PM
  2. Is there a Time Zone System Object?
    By twister in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 3rd April 2010, 07:41 PM
  3. Can you check for an Active object in a zone?
    By method72 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 18th December 2009, 04:30 PM
  4. Pick Random Object From a Zone.
    By 00J in forum File Archive
    Replies: 0
    Last Post: 28th December 2007, 07:27 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
  •