solarus-games / solarus

This repository was moved to GitLab: https://gitlab.com/solarus-games/solarus
http://www.solarus-games.org
Other
710 stars 134 forks source link

Sword loading state is stopped if on_custom_attack_received is used #1176

Closed Diarandor closed 6 years ago

Diarandor commented 6 years ago

(This is an annoying problem to code flying enemies that can only be attacked with a jumping-sword attack and not from the ground, because this bug disables the sword in this case.)

Diarandor commented 6 years ago

For enemies jumping above the hero, and the hero is on the ground with the sword_loading animation, I don't want a collision stopping the sword_loading state of the hero. That is where we needed this.

christopho commented 6 years ago

For compatibility with existing games that rely on this (stopping the sword after a successful attack), we cannot change the behavior of enemy:on_custom_attack_received(). But with the new callback parameter of #1062, the sword won't be automatically stopped.

Diarandor commented 6 years ago

Remark: The normal sword animation/state is not automatically stopped. IDK what happens now with the spin attack. But the same should happen with the three states.

EDIT: great! Issue #1062 will solve that problem if the sword is not automatically stopped for that event.