Full Version : IF/GETONTRIGMOB spawning with attachments
xmlspawner >>Q&A >>IF/GETONTRIGMOB spawning with attachments
<< Prev | Next >>
DazedAndConfused- 12-07-2006
I have placed an xmldata attachment on a player using a spawner with the following entry:
SETONTRIGMOB/ATTACH/XmlData,Done,1,1440
Now I want to set up another spawner that does something if that attachment exists on the triggering player. I have tried many forms using an IF/GETONTRIGMOB .... but they all error. Anyone know how to set up the spawner entry to check that this attachment exists?
ArteGordon- 12-07-2006
you would use the ATTACHMENT keyword to refer to properties on attachments, like
IF/GETONTRIGMOB,[ATTACHMENT,xmldata,Done,name]="Done"/33
from xmlspawner2.txt

QUOTE
- the SET series of keywords (this includes SET, SETONMOB, SETONTRIGMOB, SETONCARRIED, SETONSPAWN) now supports assigning properties on attachments. Whereever a property would normally be specified for those keywords, the new property keyword ATTACHMENT,type,name,property can be used. For example, to set the value property to 34 on an xmlvalue attachment with the name XS on a triggering mob you would specify "SETONTRIGMOB/ATTACHMENT,xmlvalue,XS,value/34" (See attachtest3.xml for examples).
The attachment properties can basically be treated as extensions of the target object's properties.
- modified the syntax for referencing attachments using the GET series of keywords.
Whereever a property would normally be specified for those keywords, the new property keyword [ATTACHMENT,type,name,property] can be used. For example, to read the value property on an xmlvalue attachment with the name XS on a triggering mob you would specify "GETONTRIGMOB,[ATTACHMENT,xmlvalue,XS,value]". The change involved using [] instead of <> for the ATTACHMENT delimiters. This was to resolve a conflict with the use of the old syntax in conditional tests. The example attachtest1.xml has been modified to reflect the change.

DazedAndConfused- 12-08-2006
Thanks Arte. I danced all around it.