- Home /
Too subjective and vague
Trading card game. Need help scripting the cards.
As it says in the title I'm making a trading card game. I don't know how to script it so i can have many different cards and have them all do something different. Will I have to script every card separately? If there's a way not to that would be preferred. And also how would I have a random hand at the start of the game? I'm relatively new to Unity. Thanks in advance for any help, it's greatly appreciated.
If you are not good at coding try playmaker it is very easy to create code it only cost 45 dollars.
What you are trying to do is very complex. Your questions have been answered, you also need to research Class and Array / List / Dictionary : http://wiki.unity3d.com/index.php?title=Which_$$anonymous$$ind_Of_Array_Or_Collection_Should_I_Use?
Sorry, but your question is not suitable for Unity Answers. Please use the Unity Forum for discussions such as "How to ...". Unity Answers is here to help you solve any specific problems you have.
Answer by Chronos-L · Apr 16, 2013 at 01:49 AM
Will I have to script every card separately?
Not really. Look at "C# delegates", you can write functions and assign them to different cards. When you have 100 effects, instead of 100 scripts, you can write in one script to assign different effects to each card via delegates.
And also how would I have a random hand at the start of the game Google on "programming shuffle cards"