0
\$\begingroup\$

Engine Used: Gamemaker Studio

I want to be able to swap between two armors on the player character. They've each got their own unique animation / general sprite stuff. How do I "equip" the second armor while the game is running? Is there even a way?

Do I need to destroy the object, and instead replace it with a different object that just has a different sprite?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Just change sprite by using:

sprite_index = spr_armor2;

Example, how it may be (Step event):

if armor_mode == 0 and sprite_index != spr_armor1
    sprite_index = spr_armor1;
else if armor_mode == 1 and sprite_index != spr_armor2
    sprite_index = spr_armor2;
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .