User Tag List

Results 1 to 6 of 6

Thread: mine car as moving platform - slopes?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    650
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    mine car as moving platform - slopes?

    I have a mine car that works like the moving platforms of DaveC's Kid Icarus Example.
    In my little game the mine car only moves, if the player character is on top of it.
    For the car movement I just use the basic code:
    X position to X object position +1
    or for a slope:
    X position to X object position +1 and
    Y position to Y object position -1

    But if I don't want to change the speed I have only one angle I can use for slopes.
    How can I determine movement angles for different slopes without using X position X +1 and Y position Y -1?

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure if this is what your looking for.

    Say you have a Cart following an irregular shaped track ( like a hand drawn curve )

    - First of you'd want the cart to be able to move along the track
    - If you have the above working, you would also want the Carts Angle to follow the angle of the tracks it's currently standing on ( cuz it looks silly if the Cart is always looking to the right )

    This method will get you the Angle of the track the Cart us standing on:

    - When the cart is standing on the track, position 1 detector at the left side/ wheel of the cart, and 1 detector at the right side/ wheel.
    - Then run loops for the detectors, moving them 1px down until they hit ground.
    - After the loops end, the Angle between the two detectors will be the angle of whatever slope the Cart is standing on.

  3. #3
    Clicker Fusion 2.5 (Steam)Android Export Module (Steam)

    Join Date
    Dec 2015
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if its a track and you know the angle of the slope you can test for entering an area and change the angle that way. you can set the angle to increment at a set ammount to smooth it out.

    wait do you just want to find out what the angle of a slope is?

  4. #4
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    620
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    King_Cool's method is the most accurate/correct way. If you want to cheat, though, and have set ground angles that the cart follows you can just place invisible actives along the track that change the cart's angle when it runs over them. Then regardless of what method you use to find the angle, you use some math to move the cart towards it.

    In my example, you set the player angle from 0-360 and it'll move towards it. 0 is straight right, 180 straight left, 90 straight up, 270 straight down, etc.

    move towards angle.mfa

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    650
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the examples.
    In my case I don't want to change the angle of the car.

    Okay I got something:
    SlopePlatform_1.mfa

    I want to use the code for an Android game but it doesn't work like expected.
    Android doesn't like my code.(Maybe PMO Object in combination with custom gravity causes the issues?)
    I hope somebody can explain to me why Android doesn't like my code.

    SlopePlatform_1.apk

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    650
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I write my code again step-by-step and everything works fine now.
    I don't know the issue, but it doesn't matter. I assume something in my old mfa file messed up.

Similar Threads

  1. Horizontal Moving Platform using Platform Movement Object example
    By Warmachine in forum Guides, Tutorials, Examples, Widgets
    Replies: 0
    Last Post: 20th January 2015, 09:31 PM
  2. 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
  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
  •