Most recent way of player slope angle match?

Get help using Construct 2

Post » Wed Jan 22, 2014 10:22 am

I have been reading through MANY forum posts over the years on having the player's character angle match the angle of slope the platform character is walking across, however some of the older methods seem outdated since newer releases of C2. This seemed to be the most promising: http://www.scirra.com/arcade/example/1575/platform-movement-with-ramps however the angles are predefined as events and I'd like the players angle to match whichever angle a slope has been set to dynamically. I hate to post this again when there's so many already, but I was wondering what would the very BEST and most efficient way of achieving this be?
B
41
S
12
G
14
Posts: 1,124
Reputation: 11,286

Post » Wed Jan 22, 2014 11:03 am

The example you posted is pretty nice.

If instead of using the predefined angles you'd set the angle to sprite.angle and just change the angle of the sprite to create the slope, it would be dynamic.

Like this
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

Post » Wed Jan 22, 2014 11:58 am

This might be a little of topic, but I'm trying to merge my current game (designed around the platform template game) with this example, and obviously there is a totally different way of the two working, one with a pinned animation to a container player, whereas the platform template just uses a character with animations. What is the preferred method in C2 of transferring this platform engine over to a game made with the platform template? I know this isn't the best topic to ask this in, but it may be useful for other who wish to do the same thing! :D Once I've sorted this out, I'll try and see how well the slopes work, hopefully we could have a really good system here!
B
41
S
12
G
14
Posts: 1,124
Reputation: 11,286

Post » Wed Jan 22, 2014 12:23 pm

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

Post » Wed Jan 22, 2014 9:18 pm

Oh my goodness, thank you so much, I'll give this a go and report back, thanks ever so much again! :D
B
41
S
12
G
14
Posts: 1,124
Reputation: 11,286

Post » Wed Jan 22, 2014 10:45 pm

This works REALLY well, I'm working on getting the engine together, and this is perfect, thanks so much!! Maybe Scirra will roll some of these ideas into the built-in platform engine eventually? :D
B
41
S
12
G
14
Posts: 1,124
Reputation: 11,286

Post » Wed Jan 22, 2014 10:59 pm

You should thank @JohnnySix , I didn't really change much.

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

Post » Thu Jan 23, 2014 10:08 am

[QUOTE=LittleStain] You should thank @JohnnySix , I didn't really change much.

[/QUOTE]

I will do :)
B
41
S
12
G
14
Posts: 1,124
Reputation: 11,286

Post » Fri May 30, 2014 10:00 pm

Elegant solution to dealing with slope!
One worries has gone, focusing more on gameplay.
ImageImage
B
119
S
52
G
24
Posts: 791
Reputation: 23,719


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests