Jump to content
  • 0

Spawn MOB/NPC only once


Berrac0

Question

Hello!

 

I'm new and learning my way around the engine, this might be a simple question but how do I make a MOB/NPC that has been pre-placed on the map spawn only once? 0 on the spawn duration field makes it come back instantly, how do you make an NPCs death "permanent"? How do you disable respawning?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 3

Only way to do that without source modification is using an event.
You can use a map event or common event:
 

1. Create a Global Variable: Set Global Variable to 0, make it 'Integer' and name it something you will remember. For this example I named it 'NPC1'

with Map Event  (Trigger = Autorun)
2. Conditional Branch - if NPC1 variable = 0,

3. Spawn NPC (NPC1)
4. Set variable NPC1 = 1

Link to comment
Share on other sites

  • 0
1 hour ago, CosakiGames said:

Only way to do that without source modification is using an event.
You can use a map event or common event:
 

1. Create a Global Variable: Set Global Variable to 0, make it 'Integer' and name it something you will remember. For this example I named it 'NPC1'

with Map Event  (Trigger = Autorun)
2. Conditional Branch - if NPC1 variable = 0,

3. Spawn NPC (NPC1)
4. Set variable NPC1 = 1

 

Ah, I see how that could work. Thanks for the answer.

 

Do events on "Autorun" run only once? or do they keep checking the conditions periodically? I'm wondering if performance could be severely affected by having too many events like this on Autorun.

Link to comment
Share on other sites

  • 0
5 minutes ago, Berrac0 said:

 

Ah, I see how that could work. Thanks for the answer.

 

Do events on "Autorun" run only once? or do they keep checking the conditions periodically? I'm wondering if performance could be severely affected by having too many events like this on Autorun.

They keep running, you could do an event tile on the map where you wold want it to be triggered.

Link to comment
Share on other sites

×
×
  • Create New...