Solarus-Games English Forum

Solarus => Development => Topic started by: Starlock on January 02, 2016, 05:53:37 PM

Title: Bomb Soldiers?
Post by: Starlock on January 02, 2016, 05:53:37 PM
I noticed while looking through the zsdx and roth repositories that there were no bomb or bow soldiers. Is it possible to make an enemy that throws bombs?
Title: Re: Bomb Soldiers?
Post by: MetalZelda on January 02, 2016, 06:03:48 PM
You can do like the greenknightsoldier.lua script.
But instead of going through the hero, you can make a movement that goes backward, and then at the end of the movement, make the ennemy arrow.
For the bomb, there is a map:create_bomb() (http://www.solarus-games.org/doc/latest/lua_api_map.html#lua_api_map_create_bomb), you can do this and make the ennemy to "throw" the bomb, with a movement.