Antwort auf: zielen und schießen

Startseite Foren Deutsches LiveCode-Forum zielen und schießen Antwort auf: zielen und schießen

#19856
akrages
Teilnehmer

    Hi.
    Hab eine Lösung gefunden.
    Der Button bewegt sich in die gewünschte Richtung.
    Allerdings funktioniert der Intersect- Befehl nicht mehr.

    Hier mal der Code:

    on mouseUp pMouseButton
       put the angle of image "zoom" into temp         
       put -200 * sin( pi / 180 * temp) into richtung
       put "," after richtung
       put -200 * cos( pi / 180 * temp) after richtung
       move btn "Ball" relative richtung      
       
       if intersect(group "Grupp1", button "Ball", "opaque pixels") then
          set the loc of img "zoom" to the loc of btn "Ball"
    end if
       
       if intersect(group "Gruppe2", button "Ball", "opaque pixels" ) then
          set the loc of img "zoom" to the loc of btn "Ball"
       end if
    end mouseUp