User Tag List

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

Thread: move object (not reposition)

  1. #1
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    move object (not reposition)

    I make the distinction in the subject between moving and repositioning where the former is progressive and the later instant.

    Is there some way of *moving* an object from x1,y1 to say, a user click-point x2,y2

    I am currently thinking along the lines of calculating the angle to determine the x/y ratio
    eg. 45o = 1/1 = every ?, move x 1pixel, y 1pixel

    I have a non-grid, organic map situation and destination points will be quite arbitrary.

    Any other suggestions?

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: move object (not reposition)

    Move it like a bullet, but slower?
    Working as fast as I can on Fusion 3

  3. #3
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: move object (not reposition)

    Yes.
    It is not so much the speed but the sense of progressive movement - although I figure if it goes quick then it can be set to go slow and I am counting on that.

    Make a move - slow
    get attacked - fast - but you see it moving in for the strike. Tension, regret - life like.

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: move object (not reposition)

    So, can you try to move it like a bullet but slower? Is that what you want?
    Working as fast as I can on Fusion 3

  5. #5
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: move object (not reposition)

    Yes.
    Or like a snail except faster ;]

    The player clicks one their piece then clicks a point on the map where they want to move it to. And then it moves (speed dependent on the object) to that point.

    The position options are positional: select, swap with another or posX/Y. Standard movements - 8 direction, etc. give no way of setting the (pre-determined) point of arrival.

    Maybe I am missing something basic here ?

  6. #6
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: move object (not reposition)

    Try a bezier curve? (eh spelling)

  7. #7
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: move object (not reposition)

    I meant that you're supposed to actually code the movement yourself. There's plenty of examples for bullet shooting that you can just tone down the speed for your desired result.
    Working as fast as I can on Fusion 3

  8. #8
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: move object (not reposition)

    Well, if I recall correctly, the formula for a line is this:

    X = t(x1+(x2-x1))
    Y = t(y1+(y2-y1))

    Where 1 is the initial coordinate, 2 is the ending coordinate, and t is time, represented as a value between 0 and 1.

    So always set an object's position to this formula using t as an alterable value, and then add 0.1 to t to progress the object along the line.

  9. #9
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: move object (not reposition)

    Thanks Jacob.
    I will try that. I am curious to see how the 't' factor affects positioning.

    I tried bouncing-ball but, being limited to 32 directions creates quite a margin of angle-error -- increasing the further the destination is from start.

    >> [what] I meant...
    I'm not a total newbie here but allow that I can miss the obvious and am happy to be told so - directly. Shooting has the same limitation as b-ball.

    RickyRombo,
    I love bezier (do heaps of my artwork as vector) but have yet to get to grips with MMF style. I like, if I can get my head around it, to address the basic math. Thanks.

  10. #10
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: move object (not reposition)

    First (quick) test has great result. I haven't the time to explore just now but the problem is that for t=0 then X=0 - the player object is set to start at 0,0.

    But, the path travelled is correct and the traveller lands !*right on the button!*

    This feels like it can be made to work.
    More later. Thanks again Jacob

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Always - move object Y-1 is to slow, and always - move object Y-2 is to fast. help
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 9th February 2012, 12:56 PM
  2. [BUG] Compatibility - Reposition / Animation Dir
    By mojofltr in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 19th August 2011, 10:08 AM
  3. Reposition Boss
    By Bk90 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 28th October 2010, 10:39 PM
  4. delay the reposition
    By semie in forum The Games Factory 2 - Technical Support
    Replies: 5
    Last Post: 26th March 2009, 01:50 AM
  5. Reposition/resize object when app maximized
    By Ran_TH in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 22nd August 2008, 07:12 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
  •