Full Version : Movable/False but with a decay?
xmlspawner >>Q&A >>Movable/False but with a decay?


<< Prev | Next >>

Discord- 06-19-2006
I have a spawner set to spawn some decorative plants, trees and such - a living forest as it were - but I want it to change regularly. I have the spawner set with a min/max of about 1 second, but I would like a plant to appear, and decay after a time interval to be replaced by another plant one second later in the spawn area, thereby giving me a forest that is ever changing... I cant seem to figure out how to make it so the players cant move or take trees and still have it accomplish what I am trying for.

Ideas?

Dis~

ArteGordon- 06-19-2006
QUOTE (Discord @ June 19, 2006 03:53 pm)
I have a spawner set to spawn some decorative plants, trees and such - a living forest  as it were - but I want it to change regularly.  I have the spawner set with a min/max of about 1 second, but I would like a plant to appear, and decay after a time interval to be replaced by another plant one second later in the spawn area, thereby giving me a forest that is ever changing... I cant seem to figure out how to make it so the players cant move or take trees and still have it accomplish what I am trying for.

Ideas?

Dis~

spawn them as movable/false so they cant be taken but set the Duration property on the spawner to the length of time that you want them to last and they will be despawned after that time elapses after they are spawned.

Discord- 06-19-2006
The problem is that I dont want the entire forest to poof at once and then pop back in a piece at a time. I would like the individual plants on the spawner to do that if one comes in each second I would like one to go out and be replaced each second, otherwise the whole forest poofs and then slowly comes back.

That make sense? Im blonde and dont always express my thoughts well.

ArteGordon- 06-19-2006
QUOTE (Discord @ June 19, 2006 04:00 pm)
The problem is that I dont want the entire forest to poof at once and then pop back in a piece at a time.  I would like the individual plants on the spawner to do that if one comes in each second I would like one to go out and be replaced each second, otherwise the whole forest poofs and then slowly comes back.

That make sense? Im blonde and dont always express my thoughts well.

yes. In order to do that, you need to have separate decay timers associated with each item. I would use the TemporaryQuestObject attachment for that. It allows you to tag individual objects and have them deleted after some time period.
So just spawn your items with the attachment like this

tree/ATTACH/temporaryquestobject,,20

and the item will be deleted after 20 minutes. The example uses an empty questname argument, since you dont need to associate it with any quest, you just want to autodelete after some time.

from xmlspawner2.txt

QUOTE

- added the new TemporaryQuestObject attachment that allows you to tag items/mobiles so that they are automatically deleted after some period of time, or whenever the quest they are associated with is completed (when the questholder associated with the quest deleted). (thanks to Eymerich for the idea).
The syntax is
TemporaryQuestObject,questname[,expiration]

To use this simply put the attachment on an object, and assign the questname, owner.
You can also use it to make temporary objects that are not associated with a quest by just specifying an expiration time.
The way it works is When the attachment is deleted, the object it is attached to is also deleted.

Typically you would probably create the object with the attachment using a spawn entry like this

GIVE/<questholder/name/MyQuest/objective1/KILL,orc/autoreward/true/rewardstring/gold,100>
GIVE/<longsword/name/Quest Sword/ATTACH/<temporaryquestobject,MyQuest/questowner/TRIGMOB>>

This would hand out a quest named MyQuest, and then give the triggering player a longsword named "Quest Sword" that was associated with MyQuest.
Note that the mobile who is the questowner of the temporaryquestobject must be manually specified by setting the QuestOwner property on the attachment.

To make a general temporary object independent of any quests, just use the attachment with an expiration time like this

longsword/name/poof/ATTACH/temporaryquestobject,tempsword,3

which would make a sword that would autodelete after 3 minutes (the name "tempsword" could be anything since it it isnt really used for autodeletion and is just to identify the attachment).

Discord- 06-19-2006
Perfecto smile.gif