Platforms That Move on a Path/Pattern

Get help using Construct 2

Post » Mon Jan 20, 2014 5:42 am

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: http://www.youtube.com/watch?v=XMAOh1FsBKY

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!
B
16
S
2
G
1
Posts: 156
Reputation: 2,117

Post » Mon Jan 20, 2014 5:56 am

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..
Need help? Upload .capx file with your question.
B
16
S
4
G
2
Posts: 233
Reputation: 2,560

Post » Mon Jan 20, 2014 3:31 pm

[QUOTE=Joannak] 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.. [/QUOTE]

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.
B
16
S
2
G
1
Posts: 156
Reputation: 2,117

Post » Mon Jan 20, 2014 4:54 pm

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 ..
Need help? Upload .capx file with your question.
B
16
S
4
G
2
Posts: 233
Reputation: 2,560

Post » Mon Jan 20, 2014 7:16 pm

[QUOTE=Joannak] 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 .. [/QUOTE]

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

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.
B
16
S
2
G
1
Posts: 156
Reputation: 2,117

Post » Mon Jan 20, 2014 7:56 pm

[QUOTE=Jim15]
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.[/QUOTE]

any good ?
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Tue Jan 21, 2014 2:45 am

[QUOTE=RamPackWobble] [QUOTE=Jim15]
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.[/QUOTE]

any good ?[/QUOTE]

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.

http://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.



I appreciate the example though. I'll try and replicate it and hopefully from there I can preview it.
B
16
S
2
G
1
Posts: 156
Reputation: 2,117

Post » Tue Jan 21, 2014 3:42 am

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!
B
16
S
2
G
1
Posts: 156
Reputation: 2,117

Post » Tue Jan 21, 2014 10:39 am

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.RamPackWobble2014-01-21 10:41:29
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Tue Jan 21, 2014 10:45 am

Glwrap seems to have to do with webgl rendering.
Maybe your pc can't handle webgl?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests