How do I - Card game...

Get help using Construct 2

Post » Tue Aug 16, 2016 4:17 pm

Hi.
I try do my first Card game in C2 and i have problem. Huh, I have for now Array - "PlayerHand" and i want move card from this array to next Array - "PlayerTable" by clicking on Card... How can i do that?
B
7
Posts: 2
Reputation: 284

Post » Mon Aug 22, 2016 7:05 pm

RLY? no one cant help me ?
B
7
Posts: 2
Reputation: 284

Post » Mon Aug 22, 2016 7:17 pm

Assuming your card object has instance variables defining its properties... When you click it, you'll want to look up its position in your PlayerHand array with the indexof() expression. With its position, you can get the values of that position to push to your new array, and then delete that index in the original array.
Mistakes were made.
B
51
S
25
G
107
Posts: 1,581
Reputation: 60,458

Post » Mon Aug 22, 2016 7:18 pm

It's difficult to help because the request is very generic. I'm going to go with : On card clicked > PlayerTableArray Set value at X to 'PlayerHand.At(X)'
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187


Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948 and 63 guests