Pointlist from move command?

Michael Kristensen michael-kristensen at dsa-net.dk
Wed Jun 30 03:48:58 EDT 2010

Hi and thanks for replies

> I dunno: if you have an object moving round a polygon (or along a
> pathway for that matter),
> surely all you have to do is poll the object's position every 2 ticks
> and pop the results into the lines
> of a field?

I did try that but it seams that the move command is not threaded and  
can not handle other commands while executing.

> Hi Mic,
> if you mean that instead of the corner points of a polygon you want  
> all the
> intermediate points also then this came up on the forum a while ago  
> and I
> uploaded a little stack to the forum that does this.
> See:
> http://forums.runrev.com/phpBB2/viewtopic.php?f=9&t=5191&p=23366&hilit=points+of+polygon#p23366
> look for the attachement
> calculate points of polygon.rev.zip
> (I did not have any real use for all the points but once I had a  
> graphic I
> "pulled" out some points and animated them when one moves the  
> graphic, since
> it looked like a bug that is what I called it :) )
> as revlet:
> http://berndniggemann.on-rev.com/bug/

Thanks Bernd

That was just what I needed.

Yet there is a but...

I put this script in the left polygon and I made it none-opaque:

on mouseUp
    put the mouseLoc into x

    repeat with i = 1 to number of lines of fld fAllPoints
       if x = line i of fld fAllPoints then
          put x
          exit repeat
          put "M " & the mouseLoc
       end if
    end repeat

end mouseUp

The beep gives me audio feedback that I clicked the graphic

In the majority of times the Loc came out with an M in front of it  
meaning that the mouseLoc was not on the pointList

So what Rev considers ON the graphic is different from your pointlist.

Tried to replace TRUNC with ROUND in your script, with same result


More information about the Use-livecode mailing list