Full Version : De-Activating a Spawner on player proximity
xmlspawner >>XMLSpawner - Discussion >>De-Activating a Spawner on player proximity
<< Prev | Next >>
OinZea- 12-03-2008
Greetings.
I will like to know if is possible to turn off a spawner when a player is in range but keep the already spawn mobs.
Example.
The spawn will activate by other means.
It will continue to spawn mobs until it reaches the maximum.
It will de-activate when a player is near and will not spawn any more mobs.
The already spawn mobs remain.
thristam- 01-09-2009
I know this is an old thread, but i feel compelled to try and help with my limited knowledge
Yes, its possiable. You'll create 2 spawners. 1 will be used to spawn all your monsters, the other is going to turn off your spawner when someone comes near.
setup your monster spawner (we'll call it mobspawn) just like your normally would.
Create another spawner (we'll call it trigspawner) and open its properties:
Set the Proximityrange on it to how far away you want the player to be able to trigger it.
Set the MINdelay and MAXdelay to 0
Set the SpawnonTrigger property to TRUE.
Click the SetItem property and target mobspawn, so it should have the mobspawner's serial.
open the spawner window on trigspawn and add this line:
SET/running/false
Now when a player comes into the range of the trigspawn, it will cause the mobspawn to turn off. Of course, there is probably a better way to do this and im no expert by far, but i think this will work for ya.
Ill try it tonight and write out how i did it.