Collision won't send boolean to false
I'm trying to get a boolean to go to true on collision then false when no longer colliding but it just stays stuck at false.
This is the logic I'm using: http://i.imgur.com/MaX45.png
If(collide){boolean is true}else{boolean is false}
I'm not sure why it always returns false when it collides does anyone have any idea what I'm doing wrong? Thanks.
This is the logic I'm using: http://i.imgur.com/MaX45.png
If(collide){boolean is true}else{boolean is false}
I'm not sure why it always returns false when it collides does anyone have any idea what I'm doing wrong? Thanks.
Best Answers
-
Socks London, UK.Posts: 12,822
As a quick debug test can you throw the 'otherwise' condition into a timer - and place it on 'after 0.5 seconds' (or enough time for the 'self.add/true' to register).
The 'true' might be registering but immediately moving on to the 'false' bit.
Just a guess, might not be relevant. -
Socks London, UK.Posts: 12,822
The method works fine for me (true as the rule and false as the 'otherwise')
A quick example:
http://www.mediafire.com/?mryafaogw7b8w8l
Answers
If not, a workaround is to make it switch that bool to false when the actor is outside the range of X distance from the other.
How would I phrase the distance part?
If actor a is > x distance (I would have to get a variable here to calculate distance) then set to false
then another rule that just sets it to true on collide?
Thanks so much for the help!
The other reason I know is I have some graphical things that trigger on true which go fine if I have nothing in the otherwise statement. Thanks for the help though.
I tried it and it worked, you are a gentleman and a scholar!