• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Limiting targets for trigger onSelfHarvestBlock/onSelfHarvestOther

I'd like to create some triggered_effects to modify a cvar when harvesting an animal or crop. I've got them set up currently like:

<append xpath="/items/item/property[@name='Tags' and contains(@value,'perkTheHuntsman')]/..">
<effect_group >
<triggered_effect trigger="onSelfHarvestOther" action="ModifyCVar" cvar="AS_huntsman_XP" operation="add" value="1"/>
<triggered_effect trigger="onSelfHarvestOther" action="ShowToolbeltMessage" message="Scored hit for huntsman"/>
</effect_group>
</append>




Which triggers and updates as intended, but triggers off any harvested entity, not just animals. I tried adding

<requirement name="TriggerHasTags" tags="butcherHarvest">


to the effect group but that disabled all of the triggers.

How can I limit the triggers to just animals (for onSelfHarvestOther) and crops (for onSelfHarvestBlock)?

Thanks

 
I'm not sure if it works when they are dead, but generally you'd use an entitytagcompare check for harvesting an entity. as for the blocks, that trigger wont work. you don't harvest a block. you damage or break it.

This is from something that i was testing but have since scrapped. It worked when i destroyed the block.

 

<triggered_effect trigger="onSelfDestroyedBlock" action="AddBuff" buff="buffHookshotTeleportTest" target="self">
<requirement name="TriggerHasTags" tags="hookshottarget"/>
</triggered_effect>



And then in blocks, i have:


    <property name="Tags" value="hookshottarget"/>

on w/e block i want to trigger the teleport.

 
To wrap up, all the cases appear to work. Also, as a fun note if you apply a passive_effect with mame=PerkLevel and don't include tags, it effects all perks!

 
Back
Top