Skip to content
This repository has been archived by the owner on Jun 7, 2018. It is now read-only.

Allow to start the sword from scripts #821

Closed
christopho opened this issue Jan 10, 2016 · 5 comments
Closed

Allow to start the sword from scripts #821

christopho opened this issue Jan 10, 2016 · 5 comments
Milestone

Comments

@christopho
Copy link
Collaborator

Make a function hero:start_attack(). By default, pressing the attack command does that.

See http://forum.solarus-games.org/index.php/topic,501.msg2417.html#msg2417

@christopho christopho added this to the v1.5 milestone Jan 10, 2016
@Diarandor
Copy link
Contributor

As @MetalZelda suggests in http://forum.solarus-games.org/index.php?topic=501.msg2434#msg2434, it would be useful too to have a function "hero:start_spin_attack()".

A nice and general syntax for future versions could be a function "hero:start_attack(attack_name)".
Pros: shorter API and simpler functions.
Cons: incompatibilities with the current syntax, which is terrible...
Anyway, one could define that general function directly using the current ones, so it is not necessary.

@Renkineko
Copy link
Contributor

But Spin Attack should be removed to be coded in Lua if I remember correctly (Spin Attack is too Zelda-specific), so the start_attack() is enough (I suppose).

@Diarandor
Copy link
Contributor

@Renkineko: I agree, although it could be useful (for other people) to keep it, because there are lots of Zelda fans who need that attack. So maybe we should keep the spin attack and give the option to enable/disable it, as someone requested, and set it disabled as default. But it's fine if you remove it, it can be easily scripted anyway. I don't know what would be the best choice...

@Renkineko
Copy link
Contributor

I think the minimal is at least to rename it to "charged attack" and not spin, because a charged attack is very generic and used in a lot of game (even not zelda-like game).

The best should be to set a generic lua script using the charged attack so people can reuse it easily, and remove the built-in spin attack.

But we are going off topic, I wonder if there is not already an issue about that :)

@wrightmat
Copy link
Contributor

I agree that the ultimate goal should be to remove engine-scripted things like the "spin attack". In the mean time, it should be scripted in Lua to ensure that it can be done with the current API. If not, any necessary functions should be added in the next release. Then the example script can be released, and the built-in "spin attack" could be removed at a later time - like I'm sure the bow and hookshot will be!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants