SOLVE Help me make this Wheel menu work!

I tried to figured out the necessary algoritm.

The first picture have Loadout Wheel and Skill slot below(next to HP) in UI layer. I use color to as skill image.

When player open the quick wheel, player can choose his skill (color for now) loudout that he create in skill loadout menu. When the player choose the wheel he wants, the chosen slot will appear in the skill slot below.

Example : player choose second loadout and the skill slot color was saved to the skill slot below.
image

This is the Skill Loadout menu. This is layer “menu”. This is where player can create or change wheel loadout in UI layer. Player can change the slot content/image by clicking at it (increase animation by number). When saved, the exact order of this “menu” loadout will be place to UI layer loadout.

For now I`ve figured that each slot must contain variable like Wheelid, animationNumber, and key.

Variable Wheelid is for what wheel menu is it at. Each wheel menu have their own ID. For example, the one with 0 degree is id 1 and 120 degree is 2.

Variable animationNumber to sync animation of both loadout wheel(im not sure how to make this work)

Variable key is important (key to use skill). Example : if 1 skillslot have Wheelid = 1 and key = 1 then …)

Hi,

Looks like you’re making progress on that wheel :slight_smile:
Can’t you use the same external layout for ‘skill loadout’ and ‘loadout wheel’? I say this because you say you need to “sync animation of both”.

I think you can use object variables for each slot, or you can use scene/global structure variables for the whole menu, like:
Loadout.1.SlotNumber.1.ID
Loadout.3.SlotNumber.4.AnimNumber
etc.
It’s explained here: Variables [GDevelop wiki]

Damn… I’ll try this right away

1 Like

https://drive.google.com/drive/folders/1fL-nHAYiESsYumCWpaJaD1Hj9R1XxM2_?usp=sharing

This is a simplified version. I still need your help as i think there might me a better way for the algorithm that i make. If all slot have scene variable(to share same childvar), and i need at least 12 slot, that its gonna really buggy soon cuz of 12 scene variables,(huge mess).

It won’t be a mess if you learn how to use dynamic access to structure variables, because you will be using variables to call the structure.
Instead of:
Loadout.3.SlotNumber.4.AnimNumber.2
You could have something like:
Loadout[slot.Variable(loadoutnumber)].SlotNumber[slot.Variable(slotnumber)].AnimNumber[slot.Variable(animnumber)]

If you’re lucky, you’ll only need one event for all slots. :slight_smile:
Read the end of the wiki, the part about “dynamic access”.

1 Like