I tried different ways, but nothing seems to work. Does anyone know how to remove food with an item? I have this atm:
<item name="devBrownPill">
<property name="Tags" value="dev"/>
<property name="HoldType" value="31"/>
<property name="CustomIcon" value="drugPainkillers"/> <property name="CustomIconTint" value="895717"/>
<property name="DisplayType" value="drugBrownPill"/>
<property name="DescriptionKey" value="devBrownPillDesc"/>
<property name="Meshfile" value="#Other/Items?Health/painkillersPrefab.prefab"/>
<property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
<property name="Material" value="Morganic"/>
<property name="Stacknumber" value="5000"/> <!-- STK food -->
<property class="Action0">
<property name="Class" value="Eat"/>
<property name="Delay" value="2.1"/>
<property name="Use_time" value="..."/>
<property name="Sound_start" value="player_eating"/>
</property>
<effect_group tiered="false" name="Food Tier 0">
<!-- <display_value name="$foodAmountAdd" value="-80"/> -->
<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$foodAmountAdd" operation="subtract" value="80"/>
</effect_group>
</item>
I realize the cvar says $foodAmountAdd, I tried $foodAmountSubtract and that still did nothing (It did not throw an error or a warning when I tried that).
<item name="devBrownPill">
<property name="Tags" value="dev"/>
<property name="HoldType" value="31"/>
<property name="CustomIcon" value="drugPainkillers"/> <property name="CustomIconTint" value="895717"/>
<property name="DisplayType" value="drugBrownPill"/>
<property name="DescriptionKey" value="devBrownPillDesc"/>
<property name="Meshfile" value="#Other/Items?Health/painkillersPrefab.prefab"/>
<property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
<property name="Material" value="Morganic"/>
<property name="Stacknumber" value="5000"/> <!-- STK food -->
<property class="Action0">
<property name="Class" value="Eat"/>
<property name="Delay" value="2.1"/>
<property name="Use_time" value="..."/>
<property name="Sound_start" value="player_eating"/>
</property>
<effect_group tiered="false" name="Food Tier 0">
<!-- <display_value name="$foodAmountAdd" value="-80"/> -->
<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$foodAmountAdd" operation="subtract" value="80"/>
</effect_group>
</item>
I realize the cvar says $foodAmountAdd, I tried $foodAmountSubtract and that still did nothing (It did not throw an error or a warning when I tried that).