• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Como hacer que un enemigo cambie de sprite cuando caes encima

M

Mateo Maidana

Guest
hacer que un enemigo cambie de sprite cuando caes encima
osea saltas caes y luego el enemigo pone cara de que fue golpeado o algo asi
 

TsukaYuriko

☄️
Forum Staff
Moderator
The GMC is an English-speaking community. Please post in English. (You may use Google Translate if needed.)
 

Toque

Member
make an enemy change sprite when you fall on I mean, you jump, and then the enemy makes a face that he was beaten or something

Thats going to be difficult to answer. The question is no specific enough.

Look up sprite_index ???

Watch some tutorials to help get you going. I hope you can find something in your native language.
 
R

Raff

Guest
A solution can be (Una solucion seria):

enemy step:

Code:
if(object_player.bbox_bottom + vsp >= bbox_top)
{
     sprite_index = sprite_golpeado;
}
vsp : is vertical velocity (es la velocidad vertical).
sprite_golpeado : is the name of the sprite you want (nombre del sprite que quieres).
 
Top