Jump to content

how do i add a property to an existing item.


Recommended Posts

so im working with xappending and im trying to add a pickup property to the shamway box without editing the xml directly

can someone send me the code or an example


You can use this to have a shamway box go into your inventory upon destroying it:


<append xpath="/blocks/block[@name=cntLootCrateShamway]">,<drop event="Destroy" name="cntLootCrateShamway" count="1" /> </append>


Since it is a child to a parent block, you'll also get the resources the parent block gives upon being destroyed which is paper in this case. If you don't want the paper and only the box itself then you can add this to only get the box:


<append xpath="/blocks/block[@name=cntLootCrateShamway]">,<drop event="Destroy" name="resourcePaper" count="0" /> </append>


If there is a way to combine those into 1 entry then I'm not sure how to do it. I'm still trying to get the hang of xpath. I did test the code above to make sure it would put the shamway box in your inventory upon destroying it. You can then place it again wherever you want it.


Hope this helps.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...