Platforms That Move on a Path/Pattern

0 favourites
  • 11 posts
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • Hi, I've been stumped lately about how I can get a platform to move in a particular pattern/path in my 2D platformer game and I was hoping maybe someone could point me in the right direction.

    To give an exact idea of what I want to do, here's a video: youtube.com/watch

    About 6 seconds into the video, you'll notice Mario encounters a platform following an oval-like path as illustrated by the line it's attached to. Throughout the level players also encounter similar platforms that move along paths, but illustrated as different shapes by the lines. I was hoping that I could have my platforms follow paths similar to these or in whatever shape/pattern I wanted, but so far I haven't been able to wrap my head around how.

    I've tried everything that comes to mind from custom movement (accelerate towards position)to the bullet behavior, but neither of these really suit my needs. Sine also appears to be too limited for what I was hoping to do, but I admit my knowledge of it is hardly extensive.

    So any ideas? I'd appreciate any help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have not tested this, but would it be possible to add multiple Sine-behaviours to one ohject? Like one controlling X and another for Y position?

    Besides that.. You can always count the time spend and make some functions to set X/Y positions..

  • I have not tested this, but would it be possible to add multiple Sine-behaviours to one ohject? Like one controlling X and another for Y position?

    Besides that.. You can always count the time spend and make some functions to set X/Y positions..

    Hmm, I don't know if that would work just because the program being able to distinguish between two separate of the same behavior seems unlikely. For instance, what if a player character had two platform behaviors? And they both called for different jump heights of the player? I think the system would just choose whatever came first.

    Then again, I am not knowledgeable in sine, so I'll play around with your idea on my lunch break today.

    Setting to position would be instantaneous though, wouldn't it? Unless I'm setting position pixel by pixel? I wonder if that would be the way to go about it?

    Thanks for the response, I'll try and mess around with it a little more and see what I come up with.

  • Yep. It is possible to add at least two sin-movements to same platform. I'm not sure if something like this will be enough, but at least it's easy to make.

    dropbox.com/s/vzh56cgs9hrdaya/DoubleSin.capx

    PS: I'm not artistic type at all .. <img src="smileys/smiley19.gif" border="0" align="middle" />

  • Yep. It is possible to add at least two sin-movements to same platform. I'm not sure if something like this will be enough, but at least it's easy to make.

    https://www.dropbox.com/s/vzh56cgs9hrdaya/DoubleSin.capx

    PS: I'm not artistic type at all .. <img src="smileys/smiley19.gif" border="0" align="middle" />

    Interesting! I had no idea that could be done. I think I can make that work with some practice, thank you!

    <img src="smileys/smiley36.gif" border="0" align="middle" /> I appreciated the extra effort with the art anyway.

    Though still it bothers me that I can't figure out how to make a platform move in any way I want. It sounds so simple, but I can't wrap my head around how. There's got to be a way.

  • Though still it bothers me that I can't figure out how to make a platform move in any way I want. It sounds so simple, but I can't wrap my head around how. There's got to be a way.

    any good ?

  • >

    > Though still it bothers me that I can't figure out how to make a platform move in any way I want. It sounds so simple, but I can't wrap my head around how. There's got to be a way.

    any good ?

    It looks to be something that helps me out, but the problem is I have no way to preview it. I keep getting errors whenever I try to load the layout.

    "JavaScript Error!

    Unspecified Error.

    localhost50000/glwrap.js, line 1422 (Col4)"

    Incidentally this seems to happen to me a lot when I download examples. Half the time I can't preview them.

    <img src="smileys/smiley5.gif" border="0" align="middle">

    I appreciate the example though. I'll try and replicate it and hopefully from there I can preview it.

  • Well I don't know why I can't preview the example you made for me, but after replicating your code and putting it in my game, it's exactly what I was looking for. Thank you RamPackWobble!

  • Your welcome - but I've just thought :

    The platforms collision poly is set small to allow the platform to partially pass the turn points ? Could cause you problems - I suggest you shrink the platform down (and now lets call this a "contact point") and make it invisible then pin to this your proper platform.

    edit

    Sorry - I've no idea about why you can't open other peoples capx without problems.

  • Glwrap seems to have to do with webgl rendering.

    Maybe your pc can't handle webgl?

  • any good ?

    Man! Either you are deviously clever, or I've grown stupid. Making object moving FSM using just control points, 1 Event and bullet behavior. <img src="smileys/smiley32.gif" border="0" align="middle">

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