How do I ..TCG?

Get help using Construct 2

Post » Mon Aug 08, 2016 7:49 am

You could run a check, there is a 'Does array contain value' and check for 1. Then you'd have to start from the current co-ord and run a check for the next 1.
B
45
S
15
G
73
Posts: 2,019
Reputation: 43,420

Post » Mon Aug 08, 2016 5:47 pm

So under the moue left and mouse right I would want to check, correct?
That's where I have it right now.

Then if it contains 1, I would want to set CurrentCard to CurX?
But then how do I check the next 1?

I feel as if I'm overthinking this.
B
5
S
1
G
1
Posts: 8
Reputation: 841

Post » Mon Aug 08, 2016 6:01 pm

It is going down a complex route, to stop this going on forever I would just look at making an array and manipulating it so that you are comfortable with what each action does, if you are going to be relying on them for the cards. The best way to use them might be to have the card stored at 0,0 displayed, then the card stored at 1,0 displayed so you can easily run through the co-ords of the array and display each card in order.

Every time you collect a card just push it to the back of the array, you can worry about things like arranging in alphabetical order later on. Push the card values onto the X 0,0 1,0 2,0 3,0 etc and practice switching between each value in the array to display the card associated with that stored value. If 'Dragon' was the first card, stored at 0,0 then you display 'Dragon', then a right key press will display 1,0. Start with the basics then branch out from there when you are comfortable with using arrays. I found that when you are using arrays, using the Debug view is helpful. You can see what is appearing in the array in the debug layout at the bottom.
B
45
S
15
G
73
Posts: 2,019
Reputation: 43,420

Previous

Return to How do I....?

Who is online

Users browsing this forum: Alvaro2, Hadyurik and 8 guests