Discord
Login
Community
DARK THEME

sprite animation with Quick Engine.

Is there a way to make somthing like when a sprite is jumping make it do a jumping thing. or look different like change sprites. But im useing Quick Engine. I tried the libary thet was sposted to do something like what i watnted but it didnt work.

You need to change the name of the sprite. With the quick engine, when you create a new sprite entity with myobj = Quick.addSprite(sprite,x,y,width,height) the myobj variable will be an object with the entity name and if the entity is grounded (and other player variables, you can find them in the quick engine documentation), so you should do:

if myobj.grounded then
  myobj.name = "sprite_idle"
else
  myobj.name = "sprite_jump"
end

tysm

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community