nioton6 Posted October 24, 2019 Share Posted October 24, 2019 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 Link to comment Share on other sites More sharing options...
Guppycur Posted October 25, 2019 Share Posted October 25, 2019 Find the node you want to add it after, then use append for the can pick is true bit. Is that what you're looking for? Link to comment Share on other sites More sharing options...
Outsida92 Posted October 25, 2019 Share Posted October 25, 2019 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.