War card game- how to determine which card is higher

Hello everyone, I’m making a war card game already made the cards shown on the table when the player wishes, gave the cards values, but I can’t figure how do I create a script that, every draw of cards, determines which card is higher …

right now the script is connected to the player and the rival’s scripts, but how do I get values from cards the are created randomaly

any ideas?

Like any embedded game property, the traditional Unity way is to create a script (which implies it derives from MonoBehavior) that every card has on it, and that script contains at the minimum a public field that has the values you are interested in.

That script might also have a way of doing extra logic, such as doing the actual comparison between two or more cards , in order to centralize logic about such things in a single location.

I’ve already gave them values
How do I get the value, if the card is created randomaly from a list of 13 cards

Then read the value out and do the comparison.

I’ve told you the solution twice now but you keep asking the same exact question without posting even one line of code.