User Tag List

Results 1 to 8 of 8

Thread: Need help with postion.

  1. #1
    No Products Registered

    Join Date
    Sep 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with postion.

    I need an object to follow my main character's hand in the game that I'm making, the object follows his hand, but when he starts moving the object gets a little offset from it.

    My code: Always (set postion of "object" to character)

    The animations and hotspots are all taken care of too.
    Is there anything that I'm doing wrong, beacuse this used to work with tgf and mmf 1.5, not with mmf2. :\

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with postion.

    The events for setting the position of the hand should come after anything that moves the object in the event list - try putting the event to the bottom.

  3. #3
    No Products Registered

    Join Date
    Sep 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with postion.

    I don't quite understand what you mean.
    You can check out the file itself, I want the (fire) object to only stay on the mage's hand, I don't want it to float around it.

    You can downlaod it here: http://rapidshare.de/files/32777477/Mage.rar

  4. #4
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with postion.

    The issue here is that before every frame is drawn, all the built-in movements are handled after your event list has been run through. This means that the flame, which is set to its position by an event, is positioned before the mage object has moved, making it appear to lag behind slightly.

    A common way to fix this is to use a separate "collider" object that is invisible and uses the movement you need, and to set both the mage and flame to the correct positions by using a "Set position" event.

  5. #5
    No Products Registered

    Join Date
    Sep 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with postion.

    I kind of understand what you are saying, I am still a noob at mmf. Do you think that you could make and example? It would be very helpfull. <img src="/center/images/graemlins/smile.gif" alt="" />

  6. #6
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with postion.

    What he is saying is that your object is moved onto the hand, then the whole person is moved.

  7. #7
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with postion.

    Here you are - I've changed your original Mage object to an invisible collider (the magenta rectangle), and the mage that the player sees is moved on top of it along with the flame.

    http://clickteam.com/center/showflat.php/Cat/0/Number/15083/an/0/page/0#Post15083

  8. #8
    No Products Registered

    Join Date
    Sep 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with postion.

    Cool deal man. Thanks alot for your help <img src="/center/images/graemlins/smile.gif" alt="" />

Similar Threads

  1. How to get to a postion in another frame that is larger than the window
    By PunchyBog in forum Android Export Module Version 2.0
    Replies: 6
    Last Post: 29th September 2013, 06:59 AM
  2. object postion
    By iammfa in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 31st March 2009, 03:52 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
  •