Solarus > Development

Enemy sprite layers

(1/1)

Porksteak:
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

llamazing:
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.

Navigation

[0] Message Index

Go to full version