How do I get a character to travel with a moving isometric object? (Solved)

0 favourites
  • 5 posts
From the Asset Store
Design for game, asset for game, game kit, UI design, completed design for game, mobile game
  • Hi everyone. I'm simply amazed at the wonderful isometric plugin R0J0hound made. I ran into a problem when introducing moving objects. Mario won't stay on the platform while it's moving. Is it possible to have a character to travel with an object?

    I'll leave the original topic below. Any help is appreciated.

    construct.net/en/forum/construct-2/addons-29/behavior-isometric-103215

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The rough logic is to keep track of what block the player is standing on, then when that block is moved you’d move the player the same amount.

    As a simple rough example in 2d you could do this:

    Player overlaps platform at offset 0,1
    — set platform.x to platform.x+1
    — set player.x to player.x+1

    There are probably more precise ways to get what the player is standing on. That and you can move the platforms in more deluxe ways. For that you may just want to keep track of the offset the player is from the platform.

  • The rough logic is to keep track of what block the player is standing on, then when that block is moved you’d move the player the same amount.

    As a simple rough example in 2d you could do this:

    Player overlaps platform at offset 0,1
    — set platform.x to platform.x+1
    — set player.x to player.x+1

    There are probably more precise ways to get what the player is standing on. That and you can move the platforms in more deluxe ways. For that you may just want to keep track of the offset the player is from the platform.

    Thank you, but I think I might be doing something wrong in the code. When I tried this I'm now stuck to the moving platform until I jump, and the z order wants to place mario behind the platform when turning in certain directions.

    Here's the capx.

    dropbox.com/s/77y3owssugkduqb/test%20isometric.capx

  • Sorry, I don't have that behavior installed and those are too many events to sort though. The idea was to get you started but likely you'll need to extend it or fix it. What you're basically doing is making a platform behavior.

    Here's another more complete example in 2d. It's still rough, but should help show some ideas with how to implement it. Or how not to, it could be too rough. In general I don't think I'll be perfecting it so hopefully it's helpful in some way.

    dropbox.com/s/9kiu6a4gm896qkq/rough_event_base_platform.capx

  • Sorry, I don't have that behavior installed and those are too many events to sort though. The idea was to get you started but likely you'll need to extend it or fix it. What you're basically doing is making a platform behavior.

    Here's another more complete example in 2d. It's still rough, but should help show some ideas with how to implement it. Or how not to, it could be too rough. In general I don't think I'll be perfecting it so hopefully it's helpful in some way.

    https://www.dropbox.com/s/9kiu6a4gm896qkq/rough_event_base_platform.capx?dl=1

    Oh my goodness, thank you so much R0J0hound! It works perfectly now. I tried your example, and the platforms are just like how I imagined they would be. : )

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)