Skip to main content
Bumped by Community user
Bumped by Community user

I'm making character select buttons for a Game Maker Studio 2 game, hoping to do so by just having a single object I can edit on an individual basis to change which character it represents. I also want the button itself to also display the sprite of the character it's intendedmeant to represent like an image overlaying the button's own sprite. I can't seem to get a clear, direct answer on how this is done.

To sum up:

*Character select button is an object with its own assigned sprite.

*Each individual button object holds (a reference to) a corresponding character object the player may select by clicking that specific button.

*Button object should be able to check the sprite of the character object it references, and draw it on top of its own sprite without replacing it entirely.

  • Character select button is an object with its own assigned sprite.

  • Each individual button object holds (a reference to) a corresponding character object the player may select by clicking that specific button.

  • Button object should be able to check the sprite of the character object it references, and draw it on top of its own sprite without replacing it entirely.

If anyone can help show me how to do that last part- or barring that, perhaps point me toward a better way to achieve a similar effect, it would be appreciated.

I'm making character select buttons for a Game Maker Studio 2 game, hoping to do so by just having a single object I can edit on an individual basis to change which character it represents. I also want the button itself to also display the sprite of the character it's intended to represent like an image overlaying the button's own sprite. I can't seem to get a clear, direct answer on how this is done.

To sum up:

*Character select button is an object with its own assigned sprite.

*Each individual button object holds (a reference to) a corresponding character object the player may select by clicking that specific button.

*Button object should be able to check the sprite of the character object it references, and draw it on top of its own sprite without replacing it entirely.

If anyone can help show me how to do that last part- or barring that, perhaps point me toward a better way to achieve a similar effect, it would be appreciated.

I'm making character select buttons for a Game Maker Studio 2 game, hoping to do so by just having a single object I can edit on an individual basis to change which character it represents. I also want the button itself to display the sprite of the character it's meant to represent like an image overlaying the button's own sprite. I can't seem to get a clear, direct answer on how this is done.

To sum up:

  • Character select button is an object with its own assigned sprite.

  • Each individual button object holds (a reference to) a corresponding character object the player may select by clicking that specific button.

  • Button object should be able to check the sprite of the character object it references, and draw it on top of its own sprite without replacing it entirely.

If anyone can help show me how to do that last part- or barring that, perhaps point me toward a better way to achieve a similar effect, it would be appreciated.

Source Link
Cobalt
  • 181
  • 1
  • 10

How to make an object with its own sprite draw an additional sprite on top of itself

I'm making character select buttons for a Game Maker Studio 2 game, hoping to do so by just having a single object I can edit on an individual basis to change which character it represents. I also want the button itself to also display the sprite of the character it's intended to represent like an image overlaying the button's own sprite. I can't seem to get a clear, direct answer on how this is done.

To sum up:

*Character select button is an object with its own assigned sprite.

*Each individual button object holds (a reference to) a corresponding character object the player may select by clicking that specific button.

*Button object should be able to check the sprite of the character object it references, and draw it on top of its own sprite without replacing it entirely.

If anyone can help show me how to do that last part- or barring that, perhaps point me toward a better way to achieve a similar effect, it would be appreciated.