Hello. I need some help figuring the best solution to a problem i have. It will help if i decribe the game in great detail. Fyi. I have limited coding knowledge and have only worked with game engines like RPG Maker MV dealing with simple variable, switches, else statement made super easy without coding.
I want to imitate the mobile game “Doodle Alchemy’s” selection mechanic to a certain degree. In the game, you simply mix two different elements together to create a new element. You tap a elemental icon, it lights up, and if you tap another working icon, it creates a new element which appears on screen with a growing list of what had been created.
( for my game i simply change the color of my icon from orange to yellow to indicate it has been selected/chosen and when tap/touched again de selected/not chosen).
I tap the fire icon, it appears to the top left slot as a visual that it has been selected
I then Tap the water icon. It appears on the top right slot as a visual it has been selected as my second element of choice. These two elements of fire and water create a new element called “steam” which is is now added along the list of icon elements of fire,water, earth, etc
But what if i tap the wrong combination? Lets say i tap the fire icon, it appears on the top left screen then i tap on another element that has no working combo like “sky.” The sky icon appears on the top right slot. Fire and sky does not create any new element.
Also if i continue to click a new element, it will replace the second element with the new.
I tap fire icon. It appears on the left slot. I tap sky icon. It appears on the right slot. This combo does nothing. I tap the mountain icon, and it replaces the sky icon (second slot) with the mountain icon. This combo does nothing . I click the space icon and it replaces the mountain icon with the space icon and so forth. The fire icon remains in the same left slot while each new element i tap replaces only the right slot.
My question is (sorry in advance for the long explanation below and above)
- How do i limit players to only be allowed to select 2 elements at a time. I dont want players to select 3, 20, 30 elements at the same time especially if for example fire can be mixed with different elements to make something new. E.g. fire with water to make steam, fire mixed with rock to make ore, fire with wood to make smoke.
b. The problem i encounter is if i make a variable for the fire icon +1 after i tap it then I tap the steam icon, it + 1 to the steam variable. These two combo dont work. But if i tap fire icon then steam icon then the metal icon. It creates the train element because steam +metal = train. It ignored that i had the fire icon variable +1 and i only want 2 element selection at a time and I only want 1 new created element at a time.
I dont want it to create the train element not until the fire icon is removed and replaced with the correct combo and maybe in the correct order.
At this point i am unsure if i want a new element to be created by inversing the combination just to limit creating to many functions but it may make it harder for players.
A. Steam + metal = train
B. Metal + Steam = train.
I may only use sample A of Steam + metal= train only.
How would i go about this issue?
Hope i explained well.