So, I have a card object that have a default animation as a back side of the card, and each card will have an element and a power. These elements and power are represented as an animation in the card object.
The elements are fire, earth, water, air
The power is a number from 1 t0 10
so, the animation can be fire_1, fire_2, fire_3, all the way to fire_10. The same for other elements like water_7, earth_6, air_10, etc.
The cards are not all created yet, since in the game they are still in the deck. The cards are created after the player (or enemy) draw the cards from the deck. I can set the correct animation to play so if the player draws 5 cards fire_1, earth_3, water_8, water_3, air_10, they all show the correct image.
The problem starts when I want to assign the element and power to the card's instance variables (power and element has their own instance variable). At first, I imagined it'd be similar to JavaScript's split() function where I can split a string to several strings based on the separator. But I just realized I can't do this in Construct 3.
I already look at the manual and the best thing I can find is search if a string has "fire", "earth", "water", or "air" in it, I can do this to get the element, but I can't get the power value.
Can anyone help? Thanks.