drawing with the "drag" command

Brad Allen BradAllen at mac.com
Sat Mar 30 17:51:01 EST 2002


I'm trying to script the drawing of a hexmap, with each hex having an 
individual set of properties. This is easy to do by manually drawing 
each hex, but I'm having trouble automating this process because of a 
weird quirk of the drag command.

Whenever I use the drag command with a drawing tool (such as regular 
polygon), Revolution creates a graphic which appears to be the 
expected size, but in fact is part of a bigger graphic which always 
ends up being the size of the entire card window.

Here is an example script which gives this result:

on drawHexTest
   set the polysides to 6
   choose regular polygon
   drag from "50,50" to "50,80"
end drawHexTest

If I iterate the drag command, each subsequent graphic is within the 
same "canvas" and has the very same id. How can I draw individualized 
graphic objects?

Thanks!
-- 



More information about the use-livecode mailing list