J
Jackson Oliver
Guest
Hello! I'm new to the Game Maker platform.
I'm trying to figure out how I can load (at runtime) images into a sprite. This code does do that, but I want to be able to load lots of images (from disk) into the sprite frames, instead of having to make a tilemap and specifying the amount.
I'm wonder if theres a way to either create a tilemap from images then load it into a sprite, or construct a sprite then recursively add images to the sprite frames.
Maybe something like this:
In short:
I would like a way to take a bunch of images, and load them into a sprite.
Thanks for helping in advance!
- Windows 10
- Game Maker 2.2.3.436 | Runtime 2.2.3.344
I'm trying to figure out how I can load (at runtime) images into a sprite. This code does do that, but I want to be able to load lots of images (from disk) into the sprite frames, instead of having to make a tilemap and specifying the amount.
Code:
var createdSprite = sprite_add("workingset/example.png", 1, false, false, 0, 0);
sprite_assign(sprite_index, createdSprite);
Maybe something like this:
Code:
var createdSprite = sprite_add("workingset/example0.png", 1, false, false, 0, 0);
sprite_add_frame(createdSprite, "workingset/example1.png");//made up function as an example
sprite_add_frame(createdSprite, "workingset/example2.png");//made up function as an example
sprite_add_frame(createdSprite, "workingset/example3.png");//made up function as an example
sprite_assign(sprite_index, createdSprite);
I would like a way to take a bunch of images, and load them into a sprite.
Thanks for helping in advance!