Then, lets add the event when a bomb hits a vehicle and disappears:
// Bomb A hits a vehicle
if ((BombAPos=3) and (PolicePos=2)) or
((BombAPos=4) and (ArmyPos=4)) or
((BombAPos=5) and (AmbulancePos=3)) then begin
begin for cicloX:=1 to 4 do ArrayBombA[cicloX].visible:=false; end;
BombAPos:=0;
PlaySound(pfEvent);
end;
// Bomb B hits a vehicle
if ((BombBPos=3) and (PolicePos=3)) or
((BombBPos=4) and (ArmyPos=3)) or
((BombBPos=5) and (AmbulancePos=3)) then begin
begin for cicloX:=1 to 4 do ArrayBombB[cicloX].visible:=false; end;
BombBPos:=0;
PlaySound(pfEvent);
end;
// Bomb C hits a vehicle
if ((BombCPos=3) and (PolicePos=4)) or
((BombCPos=4) and (ArmyPos=3)) or
((BombCPos=5) and (AmbulancePos=4)) then begin
begin for cicloX:=1 to 4 do ArrayBombC[cicloX].visible:=false; end;
BombCPos:=0;
PlaySound(pfEvent);
end;
No comments:
Post a Comment