[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LOGO-L> if touching?



Hi Pete,

At 21:05 20.7.1998 +0000, you wrote:
>I'm trying to get  some action to take place when two turtles touch, but I
keep >getting this message   ( fd didn't report anything to touching?)  in
the folowing >procedure. 
>Could someone please help me clean it up? 
>
>To Go 
>if colorunder = 15 [ announce [You Win!] stopall ] 
>if touching? [setup] 
>fd speed 
>end 
>  
>Setup would return the two touching turtles to a starting point. 
>Speed is a slider 
>
>So why do I get the above message? 
>
>Also, if I have multiple turtles on the screen - how would I designate the
touching >of  two specific turtles? 
>Thanks for the help. 

touching? needs two inputs. The inputs must be names of two turtles which
should be tested if they are touching each other.
A correct use of touching? is like this:
if touching? "t1 "t2 [setup]

In your program you did not specify the inputs therefore touching? has
assumed that [setup] is its first input and the second input should be
reported by execution of fd speed. But fd is not a reporter, it's a command
therefore it did not report anything to touching?


Regards

Peter Tomcsanyi

My favourite Logo:
http://www.edi.fmph.uniba.sk/logo/
http://www.logo.com/catalogue/titles/superlogo/index.html

---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org.  Mail
questions about the list administration to logofdn@gsn.org.  To
unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.



Global SchoolNet Foundation - Linking Kids Around the World!
Copyright GSN - All Rights Reserved - Comments & Questions
Visit GSN's Global Schoolhouse for more exciting learning resources!
Search our Site - Home