Full Version : How do i spawn a item for a few sec's
xmlspawner >>Q&A >>How do i spawn a item for a few sec's
<< Prev | Next >>
Xerrox- 10-31-2006
Hi
I have tried to make a item spawn and then disapere after 2 sec's with the [xmledit command
So far i can spawn the item by inputting this line into the Action field
stonepaversdark/z/5
(the z/5 is just to get it up where i want it.
I could do it by using a xmlspawner but since i need alot of them and i need it to do some other things to, it will be easyer this way around.
So if you have any idears how to do this i will be really happy, right now i am out of idears.
Vladimir- 10-31-2006
Just spawn the item using XmlSpawner, and in the props menu set the duration to the number of seconds you want it to be there for before it dissapears?
Xerrox- 11-02-2006
I could do that, but that leads to a new problem that i had fixed by doing it the other way around with the [xmledit
I wan't the player to lose a item evrytime they trigger this.
Sure i can make it take a item, but the only problem i get is that it keep's taking that item again and again (it's a stackable item), it should just take the item once, spawn my desired item for a few sec's and then remove it.
ArteGordon- 11-02-2006
add the TemporaryQuestObject attachment to the item which will allow it to autodelete after some period of time, like
stonepaversdark/z/5/ATTACH/temporaryquestobject,temppaver,0.03
and it will delete itself about 2 seconds after being created
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).

Xerrox- 11-02-2006
Thanks alot ArteGordon it works just as i wan't it.