Jump to content

Limiting targets for trigger onSelfHarvestBlock/onSelfHarvestOther


Recommended Posts

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"/>


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)?



Link to comment
Share on other sites

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"/>

And then in blocks, i have:

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

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...