Jump to content
  • 0

Question

Posted

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?

3 answers to this question

Recommended Posts

  • 3
Posted

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

  • 0
Posted
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.

  • 0
Posted
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.

×
×
  • Create New...