Hi, list.

I have a small script what are making me crazy...

Ok, I have sprites begining at number 160 to 264. This sprites are moveable
and sometimes can intersects between theirs or not. I need when I click
right over a sprite, the script detect the anothers sprites intersecteds.
The problem is when a sprite intersect another what intersect another. In
this case not is need what the third sprite be intersection with the first.

I wrote this script:
spriteAna= spriteNum
set listaSpritesMovidos2=[:]
repeat with i=160 to 264
    if (sprite(i).intersects(spriteAna)) and
findPos(listaSpritesMovidos2,i)=void) then 
      listaSpritesMovidos2.addProp(i,(sprite(i).loc))
      spriteAna=i
      i=160
    end if    
end repeat

The result is, for example, a list (listaSpritesMovidos2) how this: [255:
point(607, 290), 256: point(607, 277), 257: point(608, 259), 258:
point(610, 242), 259: point(612, 228), 260: point(611, 212), 264:
point(614, 198)]  , where I have the number and the position of wich sprite.

When I test this script I found the problem of (sometimes) a intersected
sprite is not included in the list. Where is the problem?

Thanks in advance...

Fabricio
Fabricio Guedes Bissoli
Phasis Multimidia

55 32 3218-5343
55 32 9103-7978


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to