# How do I rotate/flip cards?

Get help using Construct 2

### » Fri Sep 16, 2016 9:59 pm

hi can someone tell me how to rotate/flip cards

at the begining all the players card are at the same place each one on top of others, when the game start the cars rotate a little bit to the left and when the player click o the card teh card need to rotate 360°

how to achive that?
B
44
S
18
G
7
Posts: 1,819
Reputation: 10,384

### » Fri Sep 16, 2016 10:30 pm

B
71
S
22
G
281
Posts: 3,842
Reputation: 154,886

### » Fri Sep 16, 2016 11:52 pm

On click card: Set card angle to card angle + 180
B
9
S
3
Posts: 113
Reputation: 1,009

### » Sat Sep 17, 2016 10:49 am

Thanks Aher0
B
44
S
18
G
7
Posts: 1,819
Reputation: 10,384

### » Sat Sep 17, 2016 11:08 am

i did on click card set angle to card.angle+180 degrees but nothing happens
B
44
S
18
G
7
Posts: 1,819
Reputation: 10,384

### » Sat Sep 17, 2016 12:50 pm

@imothep85 see if this example works for u FlipCard Width

@Aher0 setting angle to +180 will only rotates the card by 180 degrees which turns it upside down

B
83
S
25
G
70
Posts: 1,373
Reputation: 44,863

### » Sat Sep 17, 2016 3:24 pm

thanks im going to try that
B
44
S
18
G
7
Posts: 1,819
Reputation: 10,384

### » Sat Sep 17, 2016 3:32 pm

Thanks gamecorpstudio this solve one of my question.
Now if you look the first picture i need at the begining of my game to make the pile of cards rotate a little bit like in the picture how to make that?
also with the solution you give me its a little problem if i keep clicking the flip animation stop/block :s
B
44
S
18
G
7
Posts: 1,819
Reputation: 10,384

### » Mon Sep 19, 2016 2:25 am

you could use a local variable on the card and set a angle value... then add and subtract from it ... and rotate the card accordingly to the variable value

wouldn't be easier to make a sprite sheet for ur cards? i know its memory intensive but wold make a huge quality appearance difference
B
83
S
25
G
70
Posts: 1,373
Reputation: 44,863