[Thread Prev] [Thread Next]
On Wed, 25 Jan 2012 13:36:06 -0500, zehava wizman <zehavawi1@xxxxxxxxx> wrote:
When I want to play with 2 solders, the condition "and" does not work, I
want that each one (red and green) will activate according to the key pushed
on, and according to the que.
What is the problem?
here attached the project.
I'm sorry I didn't answer before.
It is also a shame that no one else chimed in.
I don't notice anything wrong with the AND commands there.
They do what you tell them to do.
when text2 is 1 then the t3 turtle moves
when text2 is not 1 then the t1 turtle moves
On the other hand, instead of this:
let [key readchar]
ifelse and ((ascii :key) = 37) (text2 = 1)
[t3, left2][t1, left2]
ifelse and ((ascii :key) = 38) (text2 = 1)
[t3, up][t1, up]
ifelse and ((ascii :key) = 39) (text2 = 1)
[t3, righ1][t1, righ1]
ifelse and ((ascii :key) = 40) (text2 = 1)
[t3, down][t1, down]
I would have written it like this:
let [ascii key readchar]
talkto ifelse text2 = 1 ["t3] ["t1]
if :key = 37 [left2]
if :key = 38 [up]
if :key = 39 [righ1]
if :key = 40 [down]
Previous by thread:
problem with snake's game
Next by thread:
MIA, Ask an Expert: mia
To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.