# Difference between result change and value change on decorators

**URL:** <https://forums.unrealengine.com/t/difference-between-result-change-and-value-change-on-decorators/319463>\
**Category:** AI\
**Tags:** Behavior-Tree, decorator, unreal-engine, question\
**Created:** [May 22, 2015, 5:04pm UTC](https://forums.unrealengine.com/t/difference-between-result-change-and-value-change-on-decorators/319463 "2015-05-22T17:04:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asher\_S\_Einhorn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Asher\_S\_Einhorn](https://forums.unrealengine.com/u/Asher_S_Einhorn)\
**Post date:** [May 22, 2015, 5:04pm UTC](https://forums.unrealengine.com/t/difference-between-result-change-and-value-change-on-decorators/319463/1 "2015-05-22T17:04:09Z")

</div>

I assumed that the difference was that results change means the value stored is different, while value change just fires every time the variable is set.

1 = 2: result change  
1 = 1: value change

From my own experimentation it seems I was wrong. What is the true difference?

---

<div class="post-metadata">

**Author:** ![IceWraith](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IceWraith](https://forums.unrealengine.com/u/IceWraith)\
**Post date:** [May 25, 2015, 1:50pm UTC](https://forums.unrealengine.com/t/difference-between-result-change-and-value-change-on-decorators/319463/2 "2015-05-25T13:50:18Z")

</div>

It appears to be broken, I added new issue for it (UE-16106).

Value change should send restart requests each time the value in blackboard changes. Best suited for reevaluating tree when key type supports only basic operator (set / not set), for example: object key with current enemy. It’s supposed to either restart current branch, or leave it when new value doesn’t satisfy decorator’s condition.

Result change sends restart request only when result of decorator’s condition is changing. For example: range check will restart when leaving melee range, but ignore any further ranges because it doesn’t matter for the condition’s result (still out of melee).

---

<div class="post-metadata">

**Author:** ![Asher\_S\_Einhorn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Asher\_S\_Einhorn](https://forums.unrealengine.com/u/Asher_S_Einhorn)\
**Post date:** [June 9, 2015, 4:56pm UTC](https://forums.unrealengine.com/t/difference-between-result-change-and-value-change-on-decorators/319463/3 "2015-06-09T16:56:06Z")

</div>

Hi there, thanks for the response. I’m not quite sure if I understand you.

If I have an Enum, with values of Foo and Bar - result change will trigger when it changes FROM Foo TO Bar. But value change will trigger if I set it from Foo to Foo… right?

---

<div class="post-metadata">

**Author:** ![kamrann](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kamrann](https://forums.unrealengine.com/u/kamrann)\
**Post date:** [June 9, 2015, 7:30pm UTC](https://forums.unrealengine.com/t/difference-between-result-change-and-value-change-on-decorators/319463/4 "2015-06-09T19:30:52Z")

</div>

I haven’t tested but I’m pretty sure setting from Foo to Foo should never fire.

Imagine your enum has Foo, Bar and Baz. I think what Lukasz is saying is that if your decorator condition is Value == Foo, then with ValueChange, _any change to a new value_ will cause the evaluation to trigger. With ResultChange, setting from Bar to Baz (or vice versa) would not retrigger, since the _result_ of the condition (Value == Foo) was false before and is still false afterwards, so whilst the value has changed, the condition result hasn’t.

Having said that, personally I haven’t found a need yet to use the OnValueChanged setting.

---

<div class="post-metadata">

**Author:** ![hzn84](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hzn84](https://forums.unrealengine.com/u/hzn84)\
**Post date:** [July 5, 2015, 7:02pm UTC](https://forums.unrealengine.com/t/difference-between-result-change-and-value-change-on-decorators/319463/5 "2015-07-05T19:02:22Z")

</div>

Is it already fixed?

I have a simple decorator that checks if a value of float is greater or equal than some value. It seems that even tough I set “notify observer” to “on result change”, it is fired every time the value is changed.

---

<div class="post-metadata">

**Author:** ![hzn84](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hzn84](https://forums.unrealengine.com/u/hzn84)\
**Post date:** [July 5, 2015, 7:02pm UTC](https://forums.unrealengine.com/t/difference-between-result-change-and-value-change-on-decorators/319463/6 "2015-07-05T19:02:57Z")

</div>

Is it already fixed?

I have a simple decorator that checks if a value of float is greater or equal than some value. It seems that even tough I set “notify observer” to “on result change”, it is fired every time the value is changed.
