Using Actors in a Card Duel Game

evangturner

  • Posts: 15
Good Day, I was seeing if anyone could help enlighten me. I'm trying to create a Card Duel Game and I'm at a loss as to how to add a different actor for each card into the game logic, and then retrieving that card to be displayed as an actor in the field of play. There's that and then furthermore, how to randomly generate Cards #1-35 into the player's and computer's separate 7 card decks. With each mini-battle being a 1 v 1, so only 2 cards out in the field at any 1 time.

-Thanks

Tuo

  • *
  • Posts: 2469
In the StencylForge, I have an actorless card duel demo. A lot of the ideas will be the same for your game, just instead of saving the details into the lists, save the card names in the list (and then use "getActorTypeByName()" to change the text into card actors).
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

evangturner

  • Posts: 15
Thanks man. Yeah I have been modifying your Demo, the logic is great, I rated it 5 star in Forge. So basically, add them to the list in the Title Screen? Or elsewhere/additionally, as in the attributes from settings?

-Thanks


Tuo

  • *
  • Posts: 2469
It all depends on how you setup the coding. There are many ways to do it. Depending on the rest of the code, the idea you are using should work. You can then use an RNG to determine the index of the card to give to each player.
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)