If MouseDown(1) Or KeyHit(57) Then
If MilliSecs()>delaytime Then
delaytime=MilliSecs()+100
If shot Then PlaySound shot
picked=CameraPick(camera, CentreX+Rnd(-10,10),CentreY+Rnd(-10,10))
If picked<>0 Then
makehole(hole,holes)
For i=1 To 10
makespark(spark,sparks)
Next
EndIf
EndIf
EndIf
или
Function makespark(spark,sparks,count)
For i=1 To count
Local rv#=Rnd(-0.8,0.8)
spark=CopyEntity(spark,sparks)
PositionEntity spark,PickedX(),PickedY(),PickedZ(),True
AlignToVector spark,-PickedNX()+Rv,-PickedNY()+Rv,-PickedNZ()+Rv,3
Next
End Function