How to deal cards for solitaire type game

I'm new to GS, and have researched various tutorials and manuals, but can't figure out how to do this. I'm creating a solitaire type game where I click a button to turn over a standard 52 deck card. Then I click one of 5 buttons to move this card to one of 5 columns. I created a table that would store the x,y coordinates where each card should currently be. So the card actor is spawned over the deck by having all initial x,y's as the coordinates of the deck. Then when I click a column, I change the x,y table values for that card that was selected. Each card has a Move To referencing the table values. However, when I click the columns, the card doesn't move. Am I missing something? Do I need to use the constrain attribute instead? Help is appreciated! I'm having difficulties figuring out which actions are done just once, which are constantly looked at, and the best way to accomplish these actions.

Comments

  • thaas1124thaas1124 Member Posts: 9
    Thanks, I had seen this video, but it's not quite what I'm looking to do. The difference is, I'm spawning say, the ace of clubs at 0,0 so there is no move going on yet. Then I click a button and based on which button I click and how many cards are in that column, I want to move the ace of clubs to a new x,y.

    I thought just by making the actor have a move to behavior, and referencing a table would work, then any time you change the value of the x,y in the table for that card, it should move the card...but it doesn't seem to work.

    Any suggestions? Thanks! Going crazy trying to figure this out.
  • thaas1124thaas1124 Member Posts: 9
    I got the cards to move using the interpolate behavior inside a timer. But now it seems to act funky when doing this inside the rule while pressed. When you press down, triggering the rule, does the logic just loop through one time unless otherwise directed? Or is it constantly looking at the rules until you release your finger? In other words, if I just want one card to move when I press down, do I need to come up with another variable or something to limit that?
Sign In or Register to comment.