Jump to content
  • 0
Eridonis

Timer on mob?

Question

Trying to put a timer on the mob but to no prevail. Every time someone relogs into the game the mob just disappears, does the (Global Variable) reset when someone relogs? So I tried doing a conditional branch where If: Global Variable = 1, set to 1 on login but not sure if that did anything because the mob still doesn't spawn on regular intervals. So I'm going to believe its the On Death (for killer). set on the mob. How do I make this a automatic spawn without using the NPC editor to spawn.

On Map

Mob_Name (Global Variable) = 0
Wait... 30 Minutes (1800000)
Spawn (Mob) X,Y
Mob_Name (Global Variable) = 1
Autorun



Common Event

Attached to On Death (for killer). Set on mob

Show Chatbox Taxt
Mob_Name (Global Variable) = 0

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
On 1/13/2021 at 8:32 AM, Eridonis said:

does the (Global Variable) reset when someone relogs?

no, never, except if you put an event to do that.

On 1/13/2021 at 8:32 AM, Eridonis said:

If: Global Variable = 1, set to 1

nothing happens here. if the variable is already at 1, why set it to 1 again?

 

On 1/13/2021 at 8:32 AM, Eridonis said:

How do I make this a automatic spawn without using the NPC editor to spawn.

Working with events, especially to spawn monsters is complicated. 30 minutes to spawn a monster, will I assume it is a boss?

Your event on the map is right. The "x" that is causing you a problem is: the player.
For the event to work properly, you need a player on the map in question or just online in game, 24/7, without players on game, so the monster in question will naturally despawn as I see it.

 

If the monster dies, then the event will return to 0 again. If the monster doesn't die? So will a continuous spawn continue every 30 min on the map until the map is full?

If you are using a global variable, which will be common to all players, I also recommend checking the box, global event, in the event on the map, if you have not already done so.

 

An alternative for this case would be to do as @BabyLoves says
Try to activate an event at an exact time, just one time, and make sure the monster spawns even without players on the map. If it does, just leave the event continuously as it is.

 

commom event
If Mob_Name (Global Variable) = 0
Spawn (Mob) X,Y

Mob_Name (Global Variable) = 1
Wait... 30 Minutes (1800000)

Mob_Name (Global Variable) = 0

Autorun

 

I can say that I tested it for you, with an online player on the "x" map I caused an event activated at an exact time to generate a monster on the Y map, so I went there and the monster was generated. But as soon as I left the game and came back the monster disappeared.

Quote

For the event to work properly, you need a player on the map in question, 24/7,

Because of this.

 

The difference also between my method and your method is that in your method the event will only activate if there is a player on the map, in my method, you can spawn any npc on any map, as long as there is an online player (which is rule for all events). 

 

Any questions can send me a message that I explain better

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...