• Hey! Register here to create your account, engage with the community, and talk about what is new!

help with spawning

PixelatedP

New member
Joined
May 6, 2022
Messages
4
Reaction score
0
im really dumb how do you make it so if a certain mob is alive, it cant spawn again until it dies?
 
Solution
This is a way to spawn another mob if an existing one dies:



Player Event: On Join {
Variable: = (Set variable "mob_alive" to "false")​
Repeat: While = (Put the variable "mob_alive" along with the text "false") {
Control: Wait
Game Action: Spawn Mob
Variable: = (Set variable "mob_alive" to "true")​
}
}

Entity Action: On Death {
Variable: =
(Set the variable "mob_alive" to "false")
}



This example spawns a mob while the variable "mob_alive" is false. So, while the mob isn't alive, it will spawn a new one.

I hope this helps!

JustSticky

Well-known member
Overlord
Joined
Mar 4, 2021
Messages
77
Reaction score
43
This is a way to spawn another mob if an existing one dies:



Player Event: On Join {
Variable: = (Set variable "mob_alive" to "false")​
Repeat: While = (Put the variable "mob_alive" along with the text "false") {
Control: Wait
Game Action: Spawn Mob
Variable: = (Set variable "mob_alive" to "true")​
}
}

Entity Action: On Death {
Variable: =
(Set the variable "mob_alive" to "false")
}



This example spawns a mob while the variable "mob_alive" is false. So, while the mob isn't alive, it will spawn a new one.

I hope this helps!
 
Solution

SamMan_

Forum adept
Joined
Sep 6, 2020
Messages
121
Reaction score
73
This is a way to spawn another mob if an existing one dies:



Player Event: On Join {
Variable: = (Set variable "mob_alive" to "false")​
Repeat: While = (Put the variable "mob_alive" along with the text "false") {
Control: Wait
Game Action: Spawn Mob
Variable: = (Set variable "mob_alive" to "true")​
}
}

Entity Action: On Death {
Variable: =
(Set the variable "mob_alive" to "false")
}



This example spawns a mob while the variable "mob_alive" is false. So, while the mob isn't alive, it will spawn a new one.

I hope this helps!
the while would stop at some point tho, after mob_alive gets set to true & so would stop spawning new mobs after that?

the far simpler solution seems to be On Death -> Spawn Mob no?
 
Top Bottom