if timer(sensing) > 20
reset timer
[insert the cat getting hungrier]
That should do it.
Offline
Flag
set hunger to 0
reset timer
forever if < |(timer)| > |20| >
change hunger by 1
reset timer
____________
Offline
Harakou wrote:
I've tried using this:
http://i45.tinypic.com/2vx2lv6.gif
But it doesn't seem to work. Does anyone know why? (Not that it really matters; the solutions above me work fine.)
Hmm... I tried using that too and it didn't work. I think it might just be because the "forever" doesn't repeat fast enough to catch the 10th of a second when the timer is divisible by 20. Try making a variable named "timer" and changing it once a second, like this:
Offline
scmb1 wrote:
Harakou wrote:
I've tried using this:
But it doesn't seem to work. Does anyone know why? (Not that it really matters; the solutions above me work fine.)Hmm... I tried using that too and it didn't work. I think it might just be because the "forever" doesn't repeat fast enough to catch the 10th of a second when the timer is divisible by 20. Try making a variable named "timer" and changing it once a second, like this:
Right, I've tried that, and it works. But since the <wait [ ] seconds> block isn't very accurate, the other above solutions work better.
Offline
Harakou wrote:
scmb1 wrote:
Harakou wrote:
I've tried using this:
http://i45.tinypic.com/2vx2lv6.gif
But it doesn't seem to work. Does anyone know why? (Not that it really matters; the solutions above me work fine.)Hmm... I tried using that too and it didn't work. I think it might just be because the "forever" doesn't repeat fast enough to catch the 10th of a second when the timer is divisible by 20. Try making a variable named "timer" and changing it once a second, like this:
http://img821.imageshack.us/img821/6858 … 20secs.gifRight, I've tried that, and it works. But since the <wait [ ] seconds> block isn't very accurate, the other above solutions work better.
![]()
Yeah, I agree. The only situation where it would be might be better to use mine is if it is necessary to keep the time going.
Last edited by scmb1 (2010-07-03 17:07:05)
Offline
Harakou wrote:
I've tried using this:
http://i45.tinypic.com/2vx2lv6.gif
But it doesn't seem to work. Does anyone know why? (Not that it really matters; the solutions above me work fine.)
I actually tried that, too, before you posted, and it didn't work - and I think scmb1 is right. I tried running it with Flash Blocks and it seemed horribly inaccurate.
Offline