Full Version : Assigning a spawner to an item?
xmlspawner >>Q&A >>Assigning a spawner to an item?
<< Prev | Next >>
Lord Hog Fred- 10-21-2006
Ok, Is it possible for me to make an item place a spawner and then remove it at a later date?
I have a control stone that I want to place a spawner at a location and then remove it again later. Would it be possible to do this for several spawners?
Would the best way of doing this be to make the control stone perform a check then add the spawner at position x, y, z and then to remove check for an xmlspawner at x, y, z and delete it again?
If so I'm not entirely sure how I would go about doing this and I need to be able to tell the control stone exactly what to place on the spawner?
If I'm just rambling and this makes no sense please slap me and tell me to explain it again .
Thanks ,
ArteGordon- 10-21-2006
yes, you can do this.
What I would do would be to use something like the TimedLeverItem or the TimedSwitchableItem to control a spawner.
Then have that spawner spawn your other spawners.
You can configure the TimedLeverItem to have the appearance of a stone or anything else that you want. It just allows you to tie an action to double-clicking of the item.
http://xmlspawner.15.forumer.com/index.php?showtopic=90
By having a spawner controlling the the spawning of other spawners, it easily allows you to remove them later by just despawning.
Here is an example you can take a look at

QUOTE
- added the example spawnerspawner.xml that demonstrates the use of the new SETONSPAWNENTRY keyword by spawning an xmlspawner with specified spawn entries.

And this is another example of a spawner that spawns other spawners
http://xmlspawner.15.forumer.com/index.php?showtopic=76
Lord Hog Fred- 10-21-2006
Ah ok,
I thought my ramblings were a bit awkward.
What I want is for the control stone to check an XmlValue attachment that it has and if it is over X to spawn something under X to despawn it. However I want to be able to use several integers to check so if it's over X it spawns XSpawn and then if it goes over Y it spawns YSpawn in addition to XSpawn.
Sorry for my useless explanation skills .
ArteGordon- 10-21-2006
If you set up a spawner with entries like this
#CONDITION,GET,controlstonename,[ATTACHMENT,xmlvalue,whatevertheattachmentnameis,value]>5 ; orc
#CONDITION,GET,controlstonename,[ATTACHMENT,xmlvalue,whatevertheattachmentnameis,value]>10 ; troll
it will make the spawner entries condition on the value of the XmlValue attachment on your control stone.
Lord Hog Fred- 10-21-2006

QUOTE (ArteGordon @ October 21, 2006 11:24 am)
If you set up a spawner with entries like this #CONDITION,GET,controlstonename,[ATTACHMENT,xmlvalue,whatevertheattachmentnameis,value]>5 ; orc #CONDITION,GET,controlstonename,[ATTACHMENT,xmlvalue,whatevertheattachmentnameis,value]>10 ; troll it will make the spawner entries condition on the value of the XmlValue attachment on your control stone.

Haha, Fantastic
Is it possible to despawn if it drops below the Value given as well?
ArteGordon- 10-21-2006
if you wanted to despawn everything I would do it like this
#CONDITION,GET,controlstonename,[ATTACHMENT,xmlvalue,whatevertheattachmentnameis,value]<6 ; DESPAWN,1
#CONDITION,GET,controlstonename,[ATTACHMENT,xmlvalue,whatevertheattachmentnameis,value]>5 ; orc
#CONDITION,GET,controlstonename,[ATTACHMENT,xmlvalue,whatevertheattachmentnameis,value]>10 ; troll
and then just put all of the entries into subgroup 1, that way they will all spawn together as a group, but what actually ends up being spawned will depend on the value of the xmlvalue attachment.
The DESPAWN,1 keyword will then despawn everything spawned under subgroup 1.
from xmlspawner2.txt

QUOTE
-added the new standalone keyword "DESPAWN[,spawnername],subgroup" which can be used to remove all spawns from a particular subgroup on a particular spawner. If the spawnername arg is omitted, then the current spawner will be used. Note that DESPAWN will only remove spawns on entries that have the CLR flag set. If you want to remove all spawns regardless of the CLR setting, then use the DELETE keyword like this "SETONSPAWN,subgroup/DELETE"