Solarus Forum

Solarus => Development => Topic started by: Porksteak on August 12, 2019, 02:05:28 pm

Title: Enemy sprite layers
Post by: Porksteak on August 12, 2019, 02:05:28 pm
Hi I was wondering if it would be possible to have an enemy with multiple sprites with one of the sprites being on a higher layer than the others
Title: Re: Enemy sprite layers
Post by: llamazing on August 12, 2019, 02:41:19 pm
You could make an enemy that creates another enemy on a different layer using map:create_enemy(), and then the script for the first enemy always moves the second enemy to be at its same location. It would then appear to be a single enemy. You'd probably want to make it so damaging enemy #2 causes damage to enemy #1 and also remove enemy #2 when #1 is killed.