Paths for objects / Collisions with specific sides

For questions about using Classic.

Post » Wed May 27, 2009 10:27 am

Hello all. I'm making an extreeemely simple single-screen platformer, just to get my feet wet, and I have a couple of embarrassingly basic questions. Pardon the lack of proper terminology.

Paths: Is it possible, in Construct, to create a path, and then say to a specific object, hey you, follow this path? Like platforms or nasty spike blocks or what have you.

Collisions: Is there a simple way to make collisions only occur on certain sides of an object? For example, imagine a block that's flat on the top but spiky on the bottom, so the character can stand on it, but gets hurt if he jumps into it from beneath. (I can think of some creative solutions that might work, but I thought I'd ask first if there was a simple, obvious-to-everyone-but-me way.)

Oh! One more thing: Is it just me, or does 'Max fall' in the Platform behaviour not have any effect? I've had my character fall infinitely (using the Wrap behaviour), and he just gets faster and faster. All of the other variables seem to work like they should.
B
1
G
3
Posts: 3
Reputation: 831

Post » Wed May 27, 2009 10:40 am

Um... I thought I posted this in the Help forum. Did I post it in the wrong forum accidentally, because I'm an idiot, or did it get moved?

If it got moved, well... I'm not actually making any feature requests; I'm asking for help doing these things I want to do.
B
1
G
3
Posts: 3
Reputation: 831

Post » Wed May 27, 2009 12:31 pm

Check out deadeyes platform school it will answer alot of questions about this kind of stuff and shoy you how to do it.

There is not path object but it is explained in the tut i mentioned above.

also you can check collisions by comparing the positions but your better off making 2 separate object and checking collisions on the spike object. Or if you have to use one object for the spikes and platform make an invisible sprite and check collisions on that for spikes.
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Wed May 27, 2009 12:43 pm

You posted in the wrong place. I moved it to Help/Tech for you ;)

There is currently no path object, but you can create your own paths by making "waypoint" objects, and having the object you want to move around just move from waypoint to waypoint. There are a few examples of this on the forum if you want to search around.

If you want an object that is flat on top and spiky on the bottom, the easiest way to do it would be to make two objects. A platform and a spike. Or you could make your Platform/Spike hybrid tile and use that as decoration, while using invisible solid and hurty objects that are placed over the decoration in the appropriate place.

And "Max Fall" should limit the speed at which your character falls. It appears it's broke in 98.9 but in 99.2 it's fixed. So, congrats on finding your first bug and thanks to David for fixing it already :)

[quote:1badnt0f]There is not path object but it is explained in the tut i mentioned above.[/quote:1badnt0f]

What? I don't do path stuff in my tutorial :P. Unless you count "back and forth" as a path.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed May 27, 2009 12:48 pm

Back and forth is a path just not a very complicated one.
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Wed May 27, 2009 2:10 pm

[quote="deadeye":2bckt89p]You posted in the wrong place. I moved it to Help/Tech for you ;)[/quote:2bckt89p]

Gah! How did I even do that? Well, thanks. :)

[quote:2bckt89p]There is currently no path object, but you can create your own paths by making "waypoint" objects, and having the object you want to move around just move from waypoint to waypoint. There are a few examples of this on the forum if you want to search around.[/quote:2bckt89p]

Will do; thanks!

[quote:2bckt89p]If you want an object that is flat on top and spiky on the bottom, the easiest way to do it would be to make two objects. A platform and a spike. Or you could make your Platform/Spike hybrid tile and use that as decoration, while using invisible solid and hurty objects that are placed over the decoration in the appropriate place.[/quote:2bckt89p]

My platform/spike might be a moving object, but I can probably make that work by having one of the objects constantly checking for the position of the other, right?

Ideally I would like this object to be safe on the top and the sides, and only hurty on the bottom. I think I can work out a solution, though, using the same 'two objects as one' idea.

If I can't, well... you'll hear about it. :)

Thanks again!
B
1
G
3
Posts: 3
Reputation: 831

Post » Fri May 29, 2009 11:14 pm

I see two ways to do this (untested, as usual):
Method 1: make them all part of a container, then move the container object.
[list:2ap95zkr]
[*:2ap95zkr] sprite1 - underspikey-moving-platform: visible, with movement events[/*:m:2ap95zkr]
[*:2ap95zkr] sprite2 - solid platform: invisible, solid, platform[/*:m:2ap95zkr]
[*:2ap95zkr] sprite3 - spikey bit: invisible, kills player on contact[/*:m:2ap95zkr][/list:u:2ap95zkr]
If you make a container on sprite 1 with sprite 2 & 3 inside it, moving sprite 1 should move the others automatically.

Method 2: different sub-events for different conditions
For example:
[code:2ap95zkr]+ Player collides with platform
++ Player moving down
++ Player.y > platform.y
--> land on platform, standing animation, etc.
++ Player moving up
++ Player.y < platform.y + platform.height
--> kill player, lives-1, death sound, reset layout, etc.[/code:2ap95zkr]

Let me know if either of these work.
B
2
S
2
G
3
Posts: 105
Reputation: 1,510


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests