Author Topic: Enemy sprite layers  (Read 7428 times)

0 Members and 1 Guest are viewing this topic.

Porksteak
  • Newbie
  • *
  • Posts: 17
    • View Profile
Enemy sprite layers
« 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

llamazing

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Re: Enemy sprite layers
« Reply #1 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.