User Tag List

Results 1 to 7 of 7

Thread: Mouse picking up multiple objects problem

  1. #1
    No Products Registered

    Join Date
    Nov 2016
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mouse picking up multiple objects problem

    Hi all,

    I have a multiple objects in the same qualifier. I have a condition that says, when the mouse pointer is over the objects in the group and the repeat while left mouse-key is pressed then do such and such, I have also added a global variable to increment the value so it doesn't pick up other objects in the same group in its path. However, if I drop an object over or partly over another one, then try to pick up the same object again, the condition for both the object I want to pick up and the object beneath it is true, so both objects are picked up and snapped to the mouse position. How can I stop it doing this?

    Thanking you in advance.

  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,335
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    You could run a ForEach loop on the overlapping objects. Instead of directly picking up an object, activate it somehow, and pick it up after the loop is over. You should make sure only one object are activated during the loop. You could also make it so that it tests for the object with the highest id, to pick the upper most object. That will probably require an extra loop, though.

  3. #3
    No Products Registered

    Join Date
    Nov 2016
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, thanks for your reply, do you have an example of this at all? Sorry I am quite new to Clickteam Fusion.

  4. #4
    No Products Registered

    Join Date
    Nov 2016
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or is there a way to stop the mouse moving if it hits another object, so it has to go around the object? This will eliminate the risk of overlapping objects (note the mouse button will be held down when the item is dragged).

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,260
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)
    To stop picking up multiple objects you could try:

    +While left mouse pressed
    + global value a = 0
    + pick one of (qualifier)
    - set (qualifier) flag 0 to on
    - set global value to 1

    +While left mouse pressed
    + qualifier flag 0 is on
    - set qualifier x pos to xmouse
    - set qualifier y pos to ymouse

    + while left mouse is pressed (negate)
    -set global value a to 0
    - set qualifier flag 0 to off

    You would need to store the fixed value of the object you pick up and use a loop to force picking up the last thing you were carrying.

  6. #6
    No Products Registered

    Join Date
    Nov 2016
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your help, where can I find the pick one of? I can find pick, but it has things like random but no 'one' of.

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,260
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)
    Sorry, I kind of messed up my explanation. here is an example.
    Attached files Attached files

Similar Threads

  1. Physics: picking object up with mouse
    By Game_Master in forum Fusion 2.5
    Replies: 3
    Last Post: 28th March 2016, 02:08 PM
  2. problem with clone objects (multiple enemies)
    By AndyB in forum File Archive
    Replies: 21
    Last Post: 8th April 2010, 09:31 PM
  3. Problem with picking duplicate objects
    By Simon in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 28th March 2009, 12:41 AM
  4. Strange collision problem for multiple objects.
    By Canto in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 8th November 2006, 08:31 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
  •