Enemies don't spawn in Level

betterbold

Active member
I'm enjoy to make my MODs and try bonus stages. ;)
I want to spawn RED enemies in this level but RED enemies don't spawn ...
Please give me advice.

  #
  music  data/music/sushi.ogg
 
  settime 0 #
  notime  1 #
  setweap 8 #
  cameratype 1 #

  spawn1 55 0
  spawn2 160 0
  spawn3 265 0
  direction both
  scrollspeed 20

  # Load images
  background  data/bgs/sushi/sushiya.gif

  panel  data/bgs/sushi/sushiya.gif

  order  a

group 100 100
at 0

#-----------------

spawn  conbea
coords 320 246
at    0

spawn  rule
coords 320 0
at    0

spawn  king
coords 160 231
at    0

=================

spawn  sara4
coords 500 200
at    0

spawn  sara2
coords 800 200
at    0

spawn  sara3
coords 1000 200
at    0

spawn  sara1
coords 1500 200
at    0

spawn  sara4
coords 2100 200
at    0

spawn  sara4
coords 2300 200
at    0

spawn  sara1
coords 2400 200
at    0

spawn  sara1
coords 2700 200
at    0

spawn  sara4
coords 3300 200
at    0

spawn  sara2
coords 3700 200
at    0

spawn  sara3
coords 4000 200
at    0

spawn  sara4
coords 4300 200
at    0

spawn  sara2
coords 4700 200
at    0

spawn  sara3
coords 5300 200
at    0



==================

spawn  S07
coords 500 200
at    0

spawn  S02
coords 800 200
at    0

spawn  S03
coords 1000 200
at    0

spawn  S01
coords 1500 200
at    0

spawn  S05
coords 2100 200
at    0

spawn  S06
coords 2300 200
at    0

spawn  S04
coords 2400 200
at    0

spawn  S01
coords 2700 200
at    0

spawn  S05
coords 3300 200
at    0

spawn  S06
coords 3500 200
at    0

spawn  S03
coords 3700 200
at    0

spawn  S05
coords 4000 200
at    0

spawn  S06
coords 4400 200
at    0

spawn  S03
coords 5000 200
at    0
 
I don't think setting such huge value in offscreenkill is a good idea at all. Offscreenkill helps to kill entities which are stuck too far away on the screen. For sure the offscrrenkill is killing those entities, but you can try a lower value.

@betterbold I would need to see the game in action, but I think you can optmize it. Why don't you make an entity to spawn all those entities? Plus, I see many entities on the stage which, if I am guessing right, its just the same entity with a different sprite right?

Try to reuse the entities, its a trick I do a lot on my mod. If you have an entity which is an orange (which comes by and you take it on your bonus game), the other is an apple, an pinneaple, etc...you can use just ONE entity for all those itens, using a spawnscript directly on the level to change its animation:

spawn npc1
@script void main() {
  performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW1"));
} @end_script

coords 0 189 0
flip 1
at 0

With this code, I spawn the entity NPC1 but in the FOLLOW1 animation. This can help you to reduce the number of entities you make the engine to load.

For example, in my Avengers mod, all the 15 helpers are just ONE entity. I just change the animations (and the palletes) on the fly. This made me to avoid to have 15 different entities on my memory.
 
@nsw25 Thank you. It looks easy way.
I'll try it. ;D

@O Ilusionista Thank you for your valuable information.
Yes, entities only have "idle" animation. I'll try it.
 
Back
Top Bottom