Set correct angle according to platform

Get help using Construct 2

Post » Thu Jun 29, 2017 3:41 pm

I have a Character jumping around which attaches to various platforms (not platform behavior) .
When it attaches it should face away from the platform it lands on. See picture below.

https://www.dropbox.com/s/qhysoufvwm15a2q/anglePlat.jpg?dl=0

Set Characters angle to platforms angle only works one way ofc.
I can't seem to find a good workaround to get it right from both sides?

Any suggestions?
B
9
S
4
G
1
Posts: 104
Reputation: 2,278

Post » Thu Jun 29, 2017 4:31 pm

Hi,

How about:
when character is ON FLOOR set angle to ZERO
(or is touching platform)
(or is attached to platform)

or:
character angle = platform angle - 90

or:
when character is above platform then X angle
when character is below platform then Y angle

hope that works, otherwise i need to also understand how exactly do you attach to the platform.
Thank you to Construct 2 for giving me the ability to create games without programming knowledge.

My games & gaming portal = DolyGames

If anyone wants to cooperate to help each other Win-Win please email me - I am always happy to discover new opportunities.

Cheers,

COSMOS
B
20
S
9
G
1
Posts: 75
Reputation: 2,152

Post » Thu Jun 29, 2017 4:49 pm

"when character is above platform then X angle
when character is below platform then Y angle"

What about left and right? It needs to set the angle so it's facing exacly away from the platform.
B
9
S
4
G
1
Posts: 104
Reputation: 2,278

Post » Thu Jun 29, 2017 5:46 pm

left and right are only from your perspective
from the perspective of the character he is either above the platform or below it

but that said you can call it whatever words you like, left, right, up, down, it does not matter, it only matters under which condition which angle should the character have

you could even pin invisible sprites above and below the platform and make one blue and another red and say when the character is overlapping blue then X and if he is overlapping red then Y
Thank you to Construct 2 for giving me the ability to create games without programming knowledge.

My games & gaming portal = DolyGames

If anyone wants to cooperate to help each other Win-Win please email me - I am always happy to discover new opportunities.

Cheers,

COSMOS
B
20
S
9
G
1
Posts: 75
Reputation: 2,152


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, jorgmaquoi, Rable, unicornspitfire and 11 guests