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
34
S
13
G
6
Posts: 1,643
Reputation: 8,761

Post » Fri Sep 16, 2016 10:30 pm

ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227

Post » Fri Sep 16, 2016 11:52 pm

On click card: Set card angle to card angle + 180
B
9
S
3
Posts: 102
Reputation: 987

Post » Sat Sep 17, 2016 10:49 am

Thanks Aher0 :D
B
34
S
13
G
6
Posts: 1,643
Reputation: 8,761

Post » Sat Sep 17, 2016 11:08 am

i did on click card set angle to card.angle+180 degrees but nothing happens
B
34
S
13
G
6
Posts: 1,643
Reputation: 8,761

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
70
S
20
G
67
Posts: 1,315
Reputation: 42,303

Post » Sat Sep 17, 2016 3:24 pm

thanks im going to try that :D
B
34
S
13
G
6
Posts: 1,643
Reputation: 8,761

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
34
S
13
G
6
Posts: 1,643
Reputation: 8,761

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
70
S
20
G
67
Posts: 1,315
Reputation: 42,303


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 16 guests