Create objects from variables

I have been looking for an answer to this to no avail so I wanted to ask. I am recreating (well, trying) Tecmo Super Bowl in GDev. I want to populate the field with players, but each team has different uniforms and different player races at different positions. Is there a way to create an object from a variable instead of just specifying the object by name. For example, I want to have a list/array of character model variables based on the team chosen at the beginning of the game. Let’s say the player chooses the Roughriders. The global variable for home_qb would be the character model “white_green_black”. How would i create him on the field in real time based on this?

Thanks for any help.

Not sure if that’s what you want, but the action Create an object from its name allows you to use variables to refer to the objects.
So you can create “Player_” + GlobalVariableString(home_qb) if you have an object called Player_white_green_black.

2 Likes