How do I set mirroring of animation?

Get help using Construct 2

Post » Sat Mar 05, 2016 10:09 am

I have an infinite flying game. And I need to make mirroring of the player sprite when it goes right or left.
B
5
Posts: 23
Reputation: 275

Post » Sat Mar 05, 2016 2:10 pm

Keyboard - On Left Arrow Is Down - Player Set Mirrored

Pretty simple to do....
B
9
S
3
Posts: 56
Reputation: 801

Post » Sat Mar 05, 2016 3:45 pm

I found the best practice to give objPlayer an instance variable (isMirrored > boolean > false).
Because here you can set events and check if he is looking right or left - like

if objPlayer isMirrored then ...

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Sat Mar 05, 2016 4:06 pm

@fm4fanAT

Yup I thought of that after i posted lol I do the same thing just wasnt thinking at the time lol
B
9
S
3
Posts: 56
Reputation: 801

Post » Sun Mar 06, 2016 5:45 am

fr0z3n wrote:Keyboard - On Left Arrow Is Down - Player Set Mirrored

But how can I do this on touchscreen?
B
5
Posts: 23
Reputation: 275

Post » Sun Mar 06, 2016 5:54 am

First you add touch to your project by double clicking your layout and select touch. Then in the event sheet, click add event and go to touch. There you can select the action you want, just like the keyboard example.
B
6
Posts: 30
Reputation: 310


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests