User Tag List

Results 1 to 10 of 10

Thread: Mouse Controlled Object

  1. #1
    No Products Registered

    Join Date
    Mar 2008
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mouse Controlled Object

    I have a game where an object's movement is controlled by the mouse. I have the movement set up so that the object stops moving whenever it gets close to the edge. What I want to do is to make the object smaller without affecting the movement, however, every time that I try to reduce the size, or replace it with an object that looks exactly like it but smaller, the movement is messed up. How do I solve this?

  2. #2
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2007
    Location
    Suffolk, UK
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mouse Controlled Object

    Have you tried setting the scale of the object? As long as the hotspot is in an ok place, it should reduce the size without affecting the movement

  3. #3
    No Products Registered

    Join Date
    Mar 2008
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mouse Controlled Object

    I have tried that before and it didn't work. I just tried it again and changed the hotspot to the middle. When it made it smaller, the object could not reach the extent of the playfield, it stopped short.

  4. #4
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2007
    Location
    Suffolk, UK
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mouse Controlled Object

    It should work. I've done a small example here

    It's very basic but the scaled version can get to the edges just the same. Are you sure it's not some other part of your code that's stopping it?

  5. #5
    No Products Registered

    Join Date
    Mar 2008
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mouse Controlled Object

    That does work like you described, however, both of their hotspots reach the same locations and when an object is smaller, the hotspot is further from the edge of the object, so the edges do not reach the same spot. What I want to do is have each edge reach the same spot on every side of the application. Sorry for the confusion.

  6. #6
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2007
    Location
    Suffolk, UK
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mouse Controlled Object

    So, you need the tip of the object or edge or whatever to stop at the sides, right? So the centre of the object will be in a different position depending on the size, but the end result is that as soon as it hits the edge it stops? is that right?

  7. #7
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2007
    Location
    Suffolk, UK
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mouse Controlled Object

    Just added an updated one for you. hopefully thats what you wanted
    file archive post

    it stores the size in two alterable values Xsize and Ysize. They aren't really necessary but they make reading the events slightly easier

  8. #8
    No Products Registered

    Join Date
    Mar 2008
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mouse Controlled Object

    That is exactly what I wanted. Thanks! I am not as advanced yet in MMF2 so I am still working on how you did it, but thanks for your help!

  9. #9
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2007
    Location
    Suffolk, UK
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mouse Controlled Object

    It just checks if the scaling flag is on and if it is it sets when to stop it and reset it's position based on it's location and the scaling value. Then repositions it accordingly. If you get stuck trying to figure it out let me know and I'll write some comments in it for you

  10. #10
    No Products Registered

    Join Date
    Mar 2008
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mouse Controlled Object

    Thanks! I figured it out.

Similar Threads

  1. starting position of mouse controlled object
    By mbuddha in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th November 2012, 07:33 PM
  2. Mouse Pointer & Mouse controlled obejct
    By danjo in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 28th April 2012, 12:17 AM
  3. Mouse controlled object skips obstacles
    By K1kk0z90 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 26th May 2011, 06:56 PM
  4. small problem with mouse controlled object
    By troshinsky in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 17th December 2010, 12:00 AM
  5. Mouse controlled object overlapping
    By cben in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 30th September 2010, 11:32 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
  •