position

Get help using Construct 2

Post » Fri Aug 10, 2012 9:16 am

Hi im new here, so i have this same problem http://www.scirra.com/forum/set-position_topic46439.html
but i dont understand how to solved it :S someone can explain me?
B
4
Posts: 41
Reputation: 547

Post » Fri Aug 10, 2012 10:48 am

You pinned the weapon object to your platformer object right?

Mirroring the sprite on flips the animation.
You should create a second point for the platformer object on the opposite side, and when you mirror him, manually move to that point and mirror the animation of that weapon.
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Fri Aug 10, 2012 11:28 am

mmm i cant >< here's the capx https://www.dropbox.com/s/lrv1az2gt7qfakt/game1.capx
what im doing wrong? :S i try all day but nothing...
B
4
Posts: 41
Reputation: 547

Post » Fri Aug 10, 2012 11:54 am

The problem is you're positioning the arm to the box object around the character (which isn't being mirrored).
Also the image point for the arm needed to be at the shoulder.

There was some other stuff as well but here's a modified cap:
https://dl.dropbox.com/u/53374990/mirror.capx

tell me if the download link does not work
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Fri Aug 10, 2012 12:04 pm

:DDDD thx a lot
B
4
Posts: 41
Reputation: 547

Post » Fri Aug 10, 2012 12:19 pm

another thing, how can invert mouse? XD when sprite are mirrored, to the right when i move up mouse, gun move up too, but to the left, when i move mouse up, gun move down, how can invert mouse?
B
4
Posts: 41
Reputation: 547

Post » Fri Aug 10, 2012 12:33 pm

nevermind, i do it :D
B
4
Posts: 41
Reputation: 547

Post » Fri Aug 10, 2012 12:35 pm

@mugensosa

You'll probably want to change when the character/gun is mirrored to depending on which side the mouse is on compared to the character.

so if

character is not mirrored
mouse.x < character.x
->set mirrored

character is mirrored
mouse.x > character.x
->set not mirrored



you'll need to rotate the guns sprite 90 degree's so it is upright. This will keep it pointing the same direction when it is mirrored.

every tick
->set gun.angle(character.x,character.y,mouse.x,mouse.y)+90   [or do -90 if you rotated the sprite the other way]



keepee2012-08-10 12:36:15
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Fri Aug 10, 2012 1:02 pm

well i do something like that XD idont know how but it works, now i have another problem x.x ahaha when i run player goes down, i put a square for be the plataform but if i quit it player never stop run, i think never hit the floor, heres the capx for better explanation https://www.dropbox.com/s/lrv1az2gt7qfakt/game1.capx xD thx for the help :D i really try to do but i dont know what im doing XD
B
4
Posts: 41
Reputation: 547

Post » Fri Aug 10, 2012 1:08 pm

@mugensosa
you need to set the origin imagepoint to be the same centre position for all animations, that's all!

Numpad buttons can position it to edges/centre, also you can right click on "origin" and click apply to all animations.keepee2012-08-10 13:09:50
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests