Forum Discussion
2-condition trigger issue
- 4 hours ago
Have a look at the attached and see if that's what you wanted. I added a True/False variable that is toggled every time either the slider or dial is moved. The status of the fire extinguisher is changed every time this T/F variable changes (rather than the timer slider variable) IF the correct temperature and time is set.
Here’s another solution just to show you there are often several ways to work with triggers, conditions and variables to achieve your goal. Your conditions were fine, the problem is the event. The trigger reads, change state of fire extinguisher to normal when timer changes, if timer == 120 AND temperature == 450 (else Hidden). SL only evaluates conditions at the instant the event fires, nothing continuously watches variables. So if the slider’s already at 120 and you then dial the temperature to 450, no event fires and the extinguisher stays hidden. Same on the way out, drop the temperature and it stays visible until the timer moves. That’s the timer-dependence you were seeing. The standard pattern for AND conditions across two variables is one trigger per variable, identical conditions on each.
I haven't looked at the .story file, but in general I'd use >= and not == for those comparisons. Might work perfectly here, but in general it introduces the possibility that temp goes up to 500 ... and the fire extinguisher never appears, because 450==500 evaluates as false.
Related Content
- 3 months ago
- 8 months ago
- 4 months ago