Post by Basemental on Mar 27, 2018 2:42:03 GMT -5
Hi,
anyone know if there is a way to test for an object not being in a Sims inventory, as opposed to testing for the object being in the inventory?
As in a no_has_object_with_def sort of version of this, if possible at all...
Been scouring the TDESC's without finding anything.
_______________
I figured out a solution to this, if anyone is interested...
Instead of using the tests in potential outcomes in an interaction I used it in an action loot for a buff that was added to the target I wanted to perform the test for.
I then added the buff first with the test in it, if that passed (meaning the item was in the recipients inventory) that buff added is blacklisted for the second buff in the action loot.
If it doesn't pass (meaning the recipient doesn't have it in their inventory) the second buff gets added. That way I could rather test for the 2 buffs in the potential outcomes of the interaction.
Like this
anyone know if there is a way to test for an object not being in a Sims inventory, as opposed to testing for the object being in the inventory?
As in a no_has_object_with_def sort of version of this, if possible at all...
<L n="tests">
<L>
<V t="inventory">
<U n="inventory">
<V n="contents_check" t="has_object_with_def">
<U n="has_object_with_def">
<T n="definition">15441308493347997059<!--Object ID--></T>
</U>
</V>
</U>
</V>
</L>
</L>
Been scouring the TDESC's without finding anything.
_______________
I figured out a solution to this, if anyone is interested...
Instead of using the tests in potential outcomes in an interaction I used it in an action loot for a buff that was added to the target I wanted to perform the test for.
I then added the buff first with the test in it, if that passed (meaning the item was in the recipients inventory) that buff added is blacklisted for the second buff in the action loot.
If it doesn't pass (meaning the recipient doesn't have it in their inventory) the second buff gets added. That way I could rather test for the 2 buffs in the potential outcomes of the interaction.
Like this
<?xml version="1.0" encoding="utf-8"?>
<I c="LootActions" i="action" m="interactions.utils.loot" n="Basemental:Example_ActionLoot" s="15212841498044768547">
<L n="loot_actions">
<V t="buff">
<U n="buff">
<U n="buff">
<T n="buff_type">14185670891920853267<!--Buff 1--></T>
</U>
<L n="tests">
<L>
<V t="inventory">
<U n="inventory">
<V n="contents_check" t="has_object_with_def">
<U n="has_object_with_def">
<T n="definition">14675227095979103959<!--Object ID--></T>
</U>
</V>
</U>
</V>
</L>
</L>
</U>
</V>
<V t="buff">
<U n="buff">
<U n="buff">
<T n="buff_type">15107534371289645560<!--Buff 2--></T>
</U>
<L n="tests">
<L>
<V t="buff">
<U n="buff">
<L n="blacklist">
<T>14185670891920853267<!--Buff 1--></T>
</L>
</U>
</V>
</L>
</L>
</U>
</V>
</L>
</I>