I don't know, do you have an error message in error.txt?
Do you correctly call your hud script from somewhere?
Do you correctly call your hud script from somewhere?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: froggy77 on October 06, 2014, 07:46:33 PMYou are right... So, there is no way in the current API to access the "enemies/enemy_killed" sprite that the engine automatically created. (Unless by doing
Thank you for answering. For now, it does not work.
I kept the sprite "sprites/enemies/enemy_killed.png", but added several animations to it (Just a change of colors to test).
I simply copied / pasted the lines from enemy_killed.dat and put y = 32.
So I get two animations in enemy_killed.dat ("killed" and "test")
In function enemy:on_dying(), I addedsprite:set_animation("test")
This tries to work with the enemy sprite and not "enemy_killed.png"
So I put this instead.local sprite2 = enemy:get_sprite()
sprite2:set_animation("test")
This tries to work too with the enemy sprite.and not "enemy_killed.png"
OK, so I tried another thing, I copied my new lines from enemy_killed.dat to paste them into .dat of the enemy.
It's not OK, because the enemy sprite is replaced too soon and then there is the usual animation called "killed".
Moreover, the animation is either too fast (I played with the "frame_delay") or incomplete because the sprite is killed.
Quote from: froggy77 on October 06, 2014, 07:46:33 PMThis should be the preferred workaround with the current API. The engine should not crash. I reported the bug here: https://github.com/christopho/solarus/issues/635 and I will fix it for the next bugfix release.
I even deleted the pixels to make transparent the "killed" animation.
I tried with a create_sprite, but Solarus crashes and I have nothing in error log.local sprite2 = enemy:create_sprite("enemies/enemy_killed")
What I know is that the problem exists between keyboard and chair.