Issues with logic bricks

I am having troubles getting an object called Aware1 show up if a different object’s property called “Awareness” is equal to or less than 5. The Bot basically just walks around and I have several things set up so incase the Bot spots a dead body and several other things it increases its Awareness.

Here is what I got for logic bricks on my object Aware1…
Always----------------------------AND-----Edit obj–>trackto camera
Property Visible =1------------AND------Visibility = Invisible
Property Visible =2------------AND------Visiblility=Visible
Property Visible =3------------AND------Assign–>Visible->3

Then on my bot that i have patrolling around i have…
ALWAYS-----Exp:IF(Awareness<=5)-----Connects to object Aware1–Property Add Visible–>1

http://www.4shared.com/file/33488465/a1f145e6/_2__gaurd.html
Maybe that is to confusing, here is a blend file if you need it… (note, I temporarily disconnected the Health bar and other things so just ignore those for now, I just want the awareness things to show up at different spots in his awareness level.
So,
If Awareness <=5 then green dot
If Awareness <8>5 then yellow dot
If Awareness>=10 then red dot

also, I want the awareness to degenerate by 1 ever minute, how can i use the timer property to do this?

You could try adding an always sensor hooked up to a middle controller set to expression.

So your expression would be awareness <= 5

I allready tried that… please help, also how can i get a property to degenertate by 1 every minute or so based on time property?

Make a timer property called “time,” and then make a property sensor: property time interval 60-62 or whatever a minute is in logic. Then, make it add -1 to your other property. Make another actuator: assign value 0 to “time.” Of course, you could also just have an always sensor with the delay between pulses set to whatever a minute is in logic ticks (maybe like 3600?). Take note though, if you want the depleting property to never go below zero, you will want to use an expression.

Thanks Turin, appreciate it much. So, how do i use the expression controller? is the spelling affect it a lot?

is the spelling affect it a lot?

It is called Syntax… and yes it really dose matter if you get it right or not

There is a new if(expression) tut in the GE tuts section by ititrx.

ALWAYS-----Exp:IF(Awareness<=5)-----

ALWAYS-----Exp:IF(Awareness<=5 True)-----

is the correct form of the if expression. Funny huh? gets me every time…

Hey, that works great, THANK YOU!!
Turin, the Timer thing also works great, So, that stuff is all sorted out, One quick question, can you do like a double statement such as…
------------IF(Awareness>5<10 True)------------
??

You don’t really need the IF statement at all in the Expression block. These two expressions should work the same:

IF(Awareness<=5 True)

Awareness <= 5

Did you try it before you asked?

BTW, that syntax won’t work. You are saying “If Awareness is greater than 5 and 5 is less than 10.” 5 is always less than 10, so you won’t get a “False” when Awareness is greater than 10. Try either of these expressions instead:

IF(5<Awareness<10 True)

5 < Awareness < 10

Edit: I’m not trying to dis the IF statement, I just don’t use it. I imagine it would be rather useful for testing for false conditions. Of course, I just use != for that.

THANK YOU blendenzo

Cool…