Mirror pinned objects

Get help using Construct 2

Post » Sat May 26, 2012 12:52 pm

Hi, I'm new to Construct 2 but I have read a lot of tutorials and so on and didn't find this, probably a noob question.
I have a "Player" invisible object and then a "sword" invisible object and the sprite of the character, both pinned to "Player". "Player" and "sword" are like hitboxes. It works ok until I mirror the sprite, then "Player" and "sword" dont rotate.
Also Player spawn proyectils from right edge always, mirrowed or not.
How can I fix that? Thanks :)
B
3
Posts: 2
Reputation: 329

Post » Sat May 26, 2012 4:00 pm

Add an event that tells your sword and player object to mirror when the sprite is mirrored and it should work. The pin positions should mirror with the invisible object, and the sword should be in the right position.

I'll need more info if you want help with the projectiles, what are the actions and conditions of that event?
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun May 27, 2012 3:06 am

It works! Thank you!
About projectiles...
- On S pressed spawn proyectil
and
- When Player is mirrored, set angle of projectil to 180 (which seems bad at all, I just realised that the projectil change its direction while fly if I turn left)
B
3
Posts: 2
Reputation: 329

Post » Sun May 27, 2012 3:05 pm

No problem, welcome to Scirra and C2.

You might not need the set angle event if you spawn the projectile from "Player: Spawn another object" instead of "System: Create object".

If you do though, how about setting the angle to the players angle when the projectile is spawned, like this:

[code]On S pressed:
-> Player: Spawn Projectile on layer X
-> Projectile: Set angle to Player.Angle
[/code]
B
27
S
8
G
8
Posts: 903
Reputation: 8,452


Return to How do I....?

Who is online

Users browsing this forum: Vallar and 19 guests