Expressions....Houston, we have a problem.

yes we do, and tell me why the hell this expression REFUSES to evaluate the value of the fucking timer!!!

http://tomhebel.www3.dotnetplayground.com/TimerProblem.jpg

I’m not sure, but I think you have to write “PowerTimer == 3”. This should be the operator for equals to.

Yeah S_W’s right there. python treats a single equals sign as an assignment, and a double equals sign as a test for equality.

Keith. 8)

That still won’t work. The timer might be 2.9857 on one frame, and 3.0162 on the next, and never equal 3. You need to put in your expression:

PowerTimer >= 3

Yeah, wiseman’s right there. When i was using a timer property i ahd to use an interval property sensor.

Pooba

thanx guys, tried the “==” already (yes, i know about that, i program in java), but thanx for the tip… :smiley:

nope

PowerTimer>=3

doesnt work

I guess you have a Always sensor attached to the expression, set it to TRUE PULSE mode. http://hem.bredband.net/petryl/images/pulse.jpg

indeed i do! thanx for the tip! it works, but now this doesnt work:


(PowerTimer>=5)&&(PowerPreset==5)

I tried all combinations of this expression, it just doesnt work! :x

oops, just noticed i didnt have that expression hooked up to anything… :-?

Wow you shouldnt say in the topic “expression problems” :wink: maybe… connecting logic brick problems :wink:

BTW, the expression controller doesn’t use python (i don’t think) and just a plain = works just fine.

Pooba