Y
Ychabod
Guest
Hi,
I don't know if the title is clear.. (probably because I'm a noob. And French.)
I will try to explain !
I've 8 objects in my project for the 8 characters of the game.
Is it possible to create a instance of object_"X" where this "X" is a variable ?
For example, like this :
The player can choose the character to control, and my code is very long, because i've a lot of if statement like if x = 1 spawn obj_1, x = 2 spawn obj_2 etc..
PS : I'm on TRIAL version of GMS2, so I don't have scripts ^^'
I don't know if the title is clear.. (probably because I'm a noob. And French.)
I will try to explain !
I've 8 objects in my project for the 8 characters of the game.
Is it possible to create a instance of object_"X" where this "X" is a variable ?
For example, like this :
Code:
if(var X = 1)
instance_create_depth(x,y,z, object_"X")
PS : I'm on TRIAL version of GMS2, so I don't have scripts ^^'