spotlope
FSDevConf team
- Messages
- 346
- Country
Hi guys,
For some reason, I'm stumbling over this code. I've got an air conditioner unit that I'm trying to add to my scenery. The idea is to have the blades spin only when between certain hours (08:00 and 18:00), and only if the ambient temperature is above 20c. So far, I haven't been able to get it to properly evaluation that combination and trigger the animation. I've tried just testing for the time of day, which works fine. I've tried just testing for the temperature, and again that works with no problem. It's the combination of both that's hanging me up, which is why I think the problem is in my evaluation code.
This is what works:
And this works:
But this is a no-go:
Can anyone spot the problem?
thanks,
Bill
For some reason, I'm stumbling over this code. I've got an air conditioner unit that I'm trying to add to my scenery. The idea is to have the blades spin only when between certain hours (08:00 and 18:00), and only if the ambient temperature is above 20c. So far, I haven't been able to get it to properly evaluation that combination and trigger the animation. I've tried just testing for the time of day, which works fine. I've tried just testing for the temperature, and again that works with no problem. It's the combination of both that's hanging me up, which is why I think the problem is in my evaluation code.
This is what works:
<Value>(E:LOCAL TIME, Seconds) 28799 > (E:LOCAL TIME, Seconds) 64800 < and if{ 1 } els{ 0 }</Value>
And this works:
<Value>(A:AMBIENT TEMPERATURE, CELSIUS) 20 >= if{ 1 } els{ 0 }</Value>
But this is a no-go:
<Value>(E:LOCAL TIME, Seconds) 28799 > (E:LOCAL TIME, Seconds) 64800 < and (A:AMBIENT TEMPERATURE, CELSIUS) 20 > and if{ 1 } els{ 0 }</Value>
Can anyone spot the problem?
thanks,
Bill