How do I rotate/flip cards?

Get help using Construct 2

Post » 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°

Image

how to achive that?
B
41
S
16
G
7
Posts: 1,750
Reputation: 9,963

Post » Fri Sep 16, 2016 10:30 pm

ImageImageImage
B
71
S
22
G
258
Posts: 3,791
Reputation: 143,198

Post » 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

Post » Sat Sep 17, 2016 10:49 am

Thanks Aher0 :D
B
41
S
16
G
7
Posts: 1,750
Reputation: 9,963

Post » Sat Sep 17, 2016 11:08 am

i did on click card set angle to card.angle+180 degrees but nothing happens
B
41
S
16
G
7
Posts: 1,750
Reputation: 9,963

Post » 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

Image
B
78
S
23
G
69
Posts: 1,354
Reputation: 44,027

Post » Sat Sep 17, 2016 3:24 pm

thanks im going to try that :D
B
41
S
16
G
7
Posts: 1,750
Reputation: 9,963

Post » 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
41
S
16
G
7
Posts: 1,750
Reputation: 9,963

Post » 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
78
S
23
G
69
Posts: 1,354
Reputation: 44,027


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests