Help with creating a lives counter in iOS Xojo

this is the code I have but it repeats every refresh cycle of the canvas im not sure how to make it work any help would be aprricated, thank you…

if numberofbaloons=3 then //number of baloons out of 4
if first1=0 and first2=1 and first3=1 and first4=1 then //array of icons

if inarea2 = true then// in the left area
  if intop2 = true then//in the top ara
    first1=0
    first2=0
    first3=1
    first4=1
    draw=17//draws diffent charahter animations
    numberofbaloons=2//three baloons down to 2
    explosion1=1//plays explosion
    
    
    
    
  end if
end if

end if

end if

if numberofbaloons =4 then
if first1=1 and first2=1 and first3=1 and first4=1 then

if inarea2 = true then
  if intop2 = true then
    
    first1=0
    draw=9
    numberofbaloons=3
    explosion=1
    
    
    
  end if
end if

end if
end if

the bird bursts the balloons b.t.w.

1 Like

got it working by adding code every time the bird passes, if your interested in the code post back
if not thanks for your time reading this…
peace

1 Like