Solarus-Games English Forum

Solarus => Development => Topic started by: MitchellVirgil on December 12, 2016, 12:04:05 AM

Title: Dashing (SOLVED)
Post by: MitchellVirgil on December 12, 2016, 12:04:05 AM
Hey guys! So I've been attempting to create a dash move like this http://i.imgur.com/IumzFQj.gif but haven't gotten close so far. Any tips for achieving this? Thanks!
Title: Re: Dashing
Post by: Diarandor on December 12, 2016, 12:19:44 AM
If you mean about the code, it should be relatively easy. I would do something like this (but I will not make the code for you, I have no time): First freeze the hero (you could make him invincible or not during the dash if you want), set the correct animation, create a movement (with the correct direction, speed and max distance), when the movement ends just unfreeze the hero, and that should be all (or almost all). You will need to code the sword too, which is quite a bit of work. Just check the Lua API for more info about the functions.

The most annoying part is to draw your custom dash animation and the sword animations, but that is a different thing.
Title: Re: Dashing
Post by: MitchellVirgil on December 12, 2016, 06:11:42 AM
Thanks!