User Tag List

Results 1 to 10 of 10

Thread: Moving a platform in a circlar pattern

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Moving a platform in a circlar pattern

    How would I go in about making a moving platform move in a circular movement? Does it involve sinadd, or some sort of math? Does it need alterable values to do this?

    I have a pretty much good understanding of normal moving platforms, making them move forwards/backwards, or upwards/downwards only. Now I want to learn how to give them advanced movements such as circular movements and what not.

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving a platform in a circlar pattern

    Start of Frame:
    Set Value A of Platform to (Position X of Platform)
    Set Value B of Platform to (Position Y of Platform)

    Always:
    Set Position X of Platform to (Value A + Cos(Value C of Platform) * 50)
    Set Position Y of Platform to (Value B - Sin(Value C of Platform) * 50)
    Add 1 to Value C of Platform


    Change "50" to whatever you want the radius to be

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving a platform in a circlar pattern

    Like this?

    This is not doing anything. X_X

    A is X position, B is Y position, so what is C used for?

    Oh wait, hang on.... I removed line/event #3 of this picture, and it started to move around.

    Okay. I think it's going counter-clockwise motion. If I wanted to go into the opposite direction I change +Cos(C of Active) into -Cos(C of Active). Correct?

    But I still don't know what Value C is. Is this the speed of the motion? When I changed add 1 to C to Add 5 to C, it seemed to speed up.

    So now we have this object rotating in a circle. How do I get the player to move with it? Because my moving platform events don't seem to work with this as I'm doing a few quick tests.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    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)
    Tisnart's Avatar
    Join Date
    Feb 2008
    Location
    On, Canada
    Posts
    1,073
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving a platform in a circlar pattern

    Hey N64Mario ,
    Just a thought, Have you seen this article by Dines http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=67082#Post67082

    It really helped me understand this very subject

  5. #5
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving a platform in a circlar pattern

    The value C in this case is the "Angle" of the object- which direction it is pointing in at any given moment. By increasing the angle, it rotates. If you decrease the angle, it rotates in the opposite clockwise direction.

    In order to get your player to move along with a platform, there is a rather simple approach you can use for *any* platform, regardless of how it moves:
    http://create-games.com/article.asp?id=1979

    What you do essentially is this:
    1) Record the position of the platform
    2) Move the platform
    3) Move the player by the difference between the new position of the platform and the old position

    That way the player will be moved the exact amount of pixels that the platform moved in any given frame and will always be exactly synced on top of it. The actual implementation of this might be a little tricky for you at first, but if you play around with it, you should be able to do it in no time at all.

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving a platform in a circlar pattern

    Well...... I think I got the rotation down. I added the event 'foot detector' is overlapping platform. Every time my character lands on this platform, the player always disappears. X_X

    I tried things like
    'Set X position of [Player] to X("Player") + X("Platform")',
    and things like
    'add (A( "Center Active" )-Cos(C( "Rotating Platform" ))*50) to Pos X[Player]'.

    So I don't know what I'm doing wrong.

  7. #7
    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: Moving a platform in a circlar pattern

    Maybe try the Circular Movement that's built in?

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving a platform in a circlar pattern

    Quote Originally Posted by Jaffob
    Maybe try the Circular Movement that's built in?
    Well.... For one thing, I'm using all static movement in my game.

    Secondly, how will using built in circular movement help with the problem? It's just the same as what already has mentioned above. o_O

  9. #9
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving a platform in a circlar pattern

    I guess I could put together a quick example


    Actually found an example of exactly this already on my computer, so this might come in handy for you, if you can figure it out:
    http://sites.google.com/site/claniraq/stuff/WaterWheel.mfa?attredirects=0&d=1

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Re: Moving a platform in a circlar pattern

    Quote Originally Posted by Pixelthief
    I guess I could put together a quick example


    Actually found an example of exactly this already on my computer, so this might come in handy for you, if you can figure it out:
    http://sites.google.com/site/claniraq/stuff/WaterWheel.mfa?attredirects=0&d=1
    I remember these things. This thing reminds me of those little addictive hand held water-like games to make things move.

    In any case, I tried other things like Set Pos X("Player") to (X( "Player" )+(A( "Center" )-Cos(C( "Platform" ))*50))/2, but that just centers the player on the platform, ala odd binding to it. The example you showed me is a bit much of what I had in mind.

Similar Threads

  1. 2 Platform Movements overlapping on a moving platform
    By SuperDisk in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 1st July 2013, 11:20 PM
  2. Moving Platform Help
    By CloudExSolider in forum The Games Factory 2 - Technical Support
    Replies: 10
    Last Post: 1st May 2013, 11:49 PM
  3. Moving Platform in Platform Movement Object
    By radel999 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 16th July 2012, 01:49 PM
  4. Moving platform help
    By vertigoelectric in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 6th August 2009, 11:31 PM
  5. Moving platform
    By Rabagast in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 30th March 2008, 11:05 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
  •