+1

"translate"action with "else" statement

ajakhua fa 11 anys actualitzat fa 11 anys 3
When using this code, "else" is never evaluated:

<if lhs="[var:x]" operator="=" rhs="1">
<translate target="OBJ" xpos="[var:X-POS]" time="1" />
<else>
<translate target="OBJ" xpos="[var:X-POS1]" time="1" />
</else>
</if>


If I change it to the following, then it works fine:


<if lhs="[var:x]" operator="=" rhs="1">
<assign property="var:X-POS2" value="[var:X-POS]" />
<else>
<assign property="var:X-POS2" value="[var:X-POS1]" />
</else>
</if>
<translate target="OBJ" xpos="[var:X-POS2]" time="1" />


Should it work like that?
I have confirmed that this is a bug. Luckily you have already found a workaround. I will log a bug report and we will correct this issue as soon as we can.

Thank you.
This fix was pushed out to engine 1.4 this morning. In order to see the change immediately, you can build an ad-hoc ipa and test this functionality. We will be submitting a new build of fusebox to the App Store that will include this change in the fusebox engine as well.

Thanks.