intersect . . . invisible images

Richmond Mathewson richmondmathewson at gmail.com
Fri Jul 14 06:01:11 EDT 2017


Thanks, Mark, that is a solution that would work very well.

In my solution to the problem I just "parked" the images off-screen once 
they had been intersected with.

HOWEVER . . . at the risk of sound a teeny-weeny bit b*tchy . . .

It does seem illogical that while one can set levels of transparency 
with interset
an image can continue intersecting with another when it is, supposedly, 
invisible . . .

Certainly, having to explain THAT to children is going to make them take 
an even
more dim view of adults than I hope they do already.

Best, Richmond.

On 7/14/17 12:37 pm, Mark Waddingham via use-livecode wrote:
> On 2017-07-14 11:20, Richmond Mathewson via use-livecode wrote:
>> Oh dear, oh dear, oh dear . . .
>>
>> There I am fooling around setting up an "exam" for my "kiddiewinks"
>> when I discovered something quite unsuspected about intersect ;
>>
>> So I have some code that goes something like this:
>>
>> if intersect(img"A",img"B",4) then
>>    add 1 to SCORE
>>    set the vis of img "B" to false
>> end if
>>
>> now I am making img "B"invisible to that the gameplayer doesn't
>> rack up points be performing a repeated intersect
>>
>> BUT
>>
>> the intersect CONTINUES registering with a hidden image
>
> How about:
>
> if the visible of img "B" and intersect(img "A", img "B", 4) then
>     add 1 to SCORE
>     set the vis of img "B" to false
> end if
>
> Warmest Regards,
>
> Mark.
>




More information about the use-livecode mailing list