C
Chuck Vork
Guest
Is there a way to convert image files to obj's during runtime?
As said above, you can use sprite_add() to load the image from disk. sprite_add() returns the new index for that sprite, which you can then assign to the sprite_index of the object you are creating.If I can't do my above question, is there a way to load an extenal image file into an instance_create without converting it to an OBJ first?
var _loaded_sprite_index = sprite_add("player_5.png", 16, true, true, 0, 0);
var _iii = instance_create(x, y, obj_player);
_iii.sprite_index = _loaded_sprite_index;