Need help with a card drawing system

I’m currently working on a card game, but can’t figure out how to make the card drawing work properly. @Agent_Y, I know you’re working on a function like this, so if you could help me that would be much appreciated.

1 Like

What part of the drawing are you talking about? The cards moving? The values of the cards?

1 Like

Ok. I have my deck set up. I have all the code i need. I just can’t get the card to appear


image

I’ll explain how my game works. There are 10 card objects that are named “Card 1”, “Card 2”, “Card 3”, ect… They become invisible when the game starts, they also store their own starting position once at the beginning on the game, then 1/10 of a second after you start the game, they to the position of the deck object and become visible again, then when I want them to move, i.e when you click on the deck, I use the interpolate expressions from the 2nd dynamic camera example to move them from the position of the deck, to their original position.

For the values of the card, each card gets it’s value specifically sent to it thanks to them being named 1 through 10.

As for the animation of them flipping, if you are going to need that, I just ease their x size value from 100 to 0, change the animation when it’s done and then ease it back from 0 to 100

1 Like

The ‘spawn’ input is not connected ?
Just attach the Y output to trigger it.

1 Like

That wouldn’t be a good way to make a card game, if you spawn one in you have no way for it to know what card it’s supposed to be

1 Like

I completely changed the code. Now they show up.

1 Like

oh thank god i thought you were gone, since it was a month since you posted anything

Nah, you won’t get rid of me that easy, LOL
was on vacation for 2 weeks and then busy at work catching up with the work that piled up in the meantime.

All good :wink:

1 Like

@TinkerSmith it’s almost like it’s not worth vacationing for two weeks when you have to work double time to catch up upon return! :joy:

1 Like