How do I rotate character around a square (pics for details)

Get help using Construct 2

Post » Fri Jan 30, 2015 10:37 pm

The image point so I can position the inside marker at the edge of the character. The InsideMarker is not a nose lol, Its needed to test collision when doing an inside corner rotate. All three markers can be set invisible and it will run the same.

Self is just an easier way to refer to current object your giving commands to. Rather then write Sprite2.Angle I can do Self.Angle if my condition already refers to the object.
The Angle is just an expression of the sprite object.

Do a little reading in the manual about objects and expressions to get yourself familiarized.

Try this for the jumping off the ledge problem.
The purple half circle are what I call the gravity field. By increasing the size of those you can change how far your character can jump while still getting sucked down to the platform. Those can be set invisible. Easier to see the effect when they are visible.
You do not have the required permissions to view the files attached to this post.
B
33
S
8
G
2
Posts: 100
Reputation: 2,635

Post » Sat Jan 31, 2015 1:59 pm

thatserafimkid wrote:The image point so I can position the inside marker at the edge of the character. The InsideMarker is not a nose lol, Its needed to test collision when doing an inside corner rotate. All three markers can be set invisible and it will run the same.

Self is just an easier way to refer to current object your giving commands to. Rather then write Sprite2.Angle I can do Self.Angle if my condition already refers to the object.
The Angle is just an expression of the sprite object.

Do a little reading in the manual about objects and expressions to get yourself familiarized.

Try this for the jumping off the ledge problem.
The purple half circle are what I call the gravity field. By increasing the size of those you can change how far your character can jump while still getting sucked down to the platform. Those can be set invisible. Easier to see the effect when they are visible.


Cool, this new way of doing it works amazingly well, the gravity field is much simpler against what i had in mind ( was thinking of stretching the left and right markers when the chr jumped, adding each pixed of jump to the height of both the "legs" and this way he would "walk" while jumping) But i guess this way is mush more simpler to do, thanks man you made my day ;)

And yeah, it wasn't just a nose after all lol
B
5
Posts: 48
Reputation: 319

Post » Sat Jan 31, 2015 4:26 pm

You're welcome. Good luck expanding on it. Can't wait to see what your game looks like. Just reuse the gravity shields. each direction has a separate ID that correlates to the direction. So as long as you copy the right direction you can use it on any platform. The inside corners is the only tricky bit. You'll have to give your platforms ID like I did. You can probably put all your platforms in a Family and give them a Family instance variable ID. You'll have to add the code for the inside top left, bottom, left, and bottom right. Right now I have top right in the code. So you can figure it out from there.
Let me know if you get stuck at any point and I can always help you.
B
33
S
8
G
2
Posts: 100
Reputation: 2,635

Post » Sun Feb 01, 2015 4:14 pm

@thatserafimkid hey man i did all you said and the way it turned out is so epic i cant believe this is even real haha, going to add this mechanism to the remaining levels it is going to kick butt!
B
5
Posts: 48
Reputation: 319

Post » Sun Feb 01, 2015 4:36 pm

Yesterday I was goofing around with it, and I was able to have the player's gravity set to the gravity field angle instead of testing for the id. Now you can have diagonal platforms and it will still work. Check the new capx.
You do not have the required permissions to view the files attached to this post.
B
33
S
8
G
2
Posts: 100
Reputation: 2,635

Post » Sun Feb 01, 2015 5:19 pm

Thats amazing! Thanks for the help, i got it down now and i just finished adding the first few of these "blocks", atm im struggling with the transition from one square to another, because the gravity zones are overlapping, so im thinking about disabling them one at a time when the moment is right so the player can jump from one square "world" to the other, yeahhhh "struggle" i'll get around it eventually lol
B
5
Posts: 48
Reputation: 319

Post » Sun Feb 01, 2015 5:29 pm

Yeah you could create an instance variable for the player that holds the current gravity UID, then when it checks for collision it ignores that UID. Might work. Give it a shot.
B
33
S
8
G
2
Posts: 100
Reputation: 2,635

Post » Sun Feb 01, 2015 5:47 pm

confirming it works! thanks for all the help man, i might need it again because theres only one more thing left that is hard to do in my game, but thats kind of near the end of the level(yeah i first draw my levels how silly is that) so i wouldnt worry about it JUST yet haha anyways +repped (dunno how to actually rep lol)
B
5
Posts: 48
Reputation: 319

Post » Sun Feb 01, 2015 6:06 pm

You're very welcome. Any time. Just let me know if you need help with anything else.
B
33
S
8
G
2
Posts: 100
Reputation: 2,635

Previous

Return to How do I....?

Who is online

Users browsing this forum: marcinkowski, unicornspitfire and 67 guests