GMS 2 (SOLVED) How to combine string variables?

Hey guys, I am working on one of my games and I want characters to change clothing (head / body / legs) separately.

I want to use three string variables. For example:

Code:
headSlot = "some var"
bodySlot = "some var"
legsSlot = "some var"
These variables can be equal to clothing type:

Code:
bodySlot = "sp_char_Standart_"

//or

legsSlot = "sp_char_HeavyArmor_"
It means that character wears standart chestplate and heavy legs armor but you can switch values, because
"sp_char_(clothing type)_" is universal variable, it shows what the type of armor you wear in slot of legs, body, or head. You can wear armor of the same type (from one armor set)

I want to specify this variable later (when I draw sprite of legs or other). Can I just combine string variables?
Like this: "sp_char_Standart_" + "Legs_" + "Stand"/"Walk"/"Fall"/"Jump" = "sp_char_Standart_Legs_Stand/Walk/Fall/Jump" ?

General formula is:
sp_char_ + (clothingType) + (Body/Head/Legs) + (state)

Variable of the state can be changed dynamically and can be equals to "Stand", "Jump" etc.

I can set variable of the part of the body when I draw it and it can be equals to "Head", "Body" etc.

These two variable are string variables too.

Can I do it and use something like "sp_char_Standart_Body_Jump" as name of sprite I drew before? Or maybe there is a better way?
 
Top