Kleines (sinnloses)Snakeartiges Spiel

  • Hey Leute,

    habe heute den ganzen Tag an einem kleinen Spiel gesessen und wollte mal Wissen was ihr davon haltet^^
    Es hat noch einige Fehler xD
    Ich beschäftige mich mit AutoIt seit etwa 1 Woche (vorher schon ne Zeit lang C++).

    Hier das Script:

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Include <Misc.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $pPos1 = 256
    Global $pPos2 = 192
    Global $gPos1 = 0
    Global $gPos2 = 0
    Global $hoehe = 32
    Global $breite = 16
    Global $richtung = 0
    Global $anim = 1
    Global $score = 0
    Global $rnd[5]
    $rnd[0] = 0
    $rnd[1] = Random(1, 10, 1)
    $rnd[2] = Random(1, 10, 1)
    $rnd[3] = Random(1, 10, 1)
    $rnd[4] = Random(1, 10, 1)

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Spiel", 593, 487, 201, 126)
    $scorelabel = GUICtrlCreateLabel ( "Punkte: " & $score, 15, 3, 200, 15)
    $gold = GUICtrlCreatePic(@ScriptDir & "\Spiel BMP's\gold.bmp", $gPos1, $gPos2, 10, 10, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $player = GUICtrlCreatePic(@ScriptDir & "\Spiel BMP's\down.bmp", $pPos1, $pPos2, $breite, $hoehe, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $pic = GUICtrlCreatePic(@ScriptDir & "\Spiel BMP's\grundflaeche.bmp", 0, 20, 593, 467, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    $gPos1 = Random(6, 580, 1)
    $gPos2 = Random(25, 460, 1)
    GUICtrlSetPos($gold, $gPos1, $gPos2)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit]

    If _isPressed (27) Then
    _right()

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf _isPressed (25) Then
    _left()

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf _isPressed (26) Then
    _up()

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf _isPressed (28) Then
    _down()

    [/autoit] [autoit][/autoit] [autoit]

    Else
    If $richtung = 1 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\left.bmp")

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $richtung = 2 Then
    $hoehe = 32
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\right.bmp")

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $richtung = 3 Then
    $hoehe = 32
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\up.bmp")

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $richtung = 4 Then
    $hoehe = 32
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\down.bmp")
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    If $pPos1 <= 5 Then
    $pPos1 = 6

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $pPos2 <= 25 Then
    $pPos2 = 26

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $pPos1 >= 571 Then
    $pPos1 = 570

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $pPos2 >= 450 Then
    $pPos2 = 449

    [/autoit] [autoit][/autoit] [autoit]

    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    If $pPos1 = $gPos1 And $pPos2 = $gPos2 Then
    $score +=1
    GUICtrlSetData($scorelabel, "Punkte: " & $score)
    $gPos1 = Random(6, 580, 1)
    $gPos2 = Random(25, 460, 1)
    GUICtrlSetPos($gold, $gPos1, $gPos2)

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $pPos1 = ($gPos1+$rnd[1]) And $pPos2 = ($gPos2+$rnd[2]) Then
    $score +=1
    GUICtrlSetData($scorelabel, "Punkte: " & $score)
    $gPos1 = Random(6, 580, 1)
    $gPos2 = Random(25, 460, 1)
    GUICtrlSetPos($gold, $gPos1, $gPos2)

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $pPos1 = ($gPos1-$rnd[1]) And $pPos2 = ($gPos2-$rnd[2]) Then
    $score +=1
    GUICtrlSetData($scorelabel, "Punkte: " & $score)
    $gPos1 = Random(6, 580, 1)
    $gPos2 = Random(25, 460, 1)
    GUICtrlSetPos($gold, $gPos1, $gPos2)

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $pPos1 = ($gPos1+$rnd[1]) And $pPos2 = ($gPos2+$rnd[2]) Then
    $score +=1
    GUICtrlSetData($scorelabel, "Punkte: " & $score)
    $gPos1 = Random(6, 580, 1)
    $gPos2 = Random(25, 460, 1)
    GUICtrlSetPos($gold, $gPos1, $gPos2)

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $pPos1 = ($gPos1-$rnd[1]) And $pPos2 = ($gPos2-$rnd[2]) Then
    $score +=1
    GUICtrlSetData($scorelabel, "Punkte: " & $score)
    $gPos1 = Random(6, 580, 1)
    $gPos2 = Random(25, 460, 1)
    GUICtrlSetPos($gold, $gPos1, $gPos2)

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf ($pPos1+$rnd[3]) = $gPos1 And ($pPos2+$rnd[4]) = $gPos2 Then
    $score +=1
    GUICtrlSetData($scorelabel, "Punkte: " & $score)
    $gPos1 = Random(6, 580, 1)
    $gPos2 = Random(25, 460, 1)
    GUICtrlSetPos($gold, $gPos1, $gPos2)

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf ($pPos1-$rnd[3]) = $gPos1 And ($pPos2-$rnd[4]) Then
    $score +=1
    GUICtrlSetData($scorelabel, "Punkte: " & $score)
    $gPos1 = Random(6, 580, 1)
    $gPos2 = Random(25, 460, 1)
    GUICtrlSetPos($gold, $gPos1, $gPos2)

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf ($pPos1+$rnd[3]) = $gPos1 And ($pPos2+$rnd[4]) Then
    $score +=1
    GUICtrlSetData($scorelabel, "Punkte: " & $score)
    $gPos1 = Random(6, 580, 1)
    $gPos2 = Random(25, 460, 1)
    GUICtrlSetPos($gold, $gPos1, $gPos2)

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf ($pPos1-$rnd[3]) = $gPos1 And ($pPos2-$rnd[4]) Then
    $score +=1
    GUICtrlSetData($scorelabel, "Punkte: " & $score)
    $gPos1 = Random(6, 580, 1)
    $gPos2 = Random(25, 460, 1)
    GUICtrlSetPos($gold, $gPos1, $gPos2)

    [/autoit] [autoit][/autoit] [autoit]

    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _left()

    [/autoit] [autoit][/autoit] [autoit]

    $richtung = 1
    GUICtrlSetPos($player, $pPos1-1, $pPos2)

    [/autoit] [autoit][/autoit] [autoit]

    If $anim = 1 Then
    $hoehe = 32
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\left.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 6 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\left1.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 9 Then
    $hoehe = 30
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\left2.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 12 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\left3.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 15 Then
    $hoehe = 32
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\left4.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 18 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\left5.bmp")
    $anim +=5

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 21 Then
    $hoehe = 30
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\left6.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 24 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\left7.bmp")
    $anim = 0

    [/autoit] [autoit][/autoit] [autoit]

    Else
    $anim +=1
    EndIf
    $pPos1 = $pPos1-1
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _right()
    $hoehe = 30
    $richtung = 2
    GUICtrlSetPos($player, $pPos1+1, $pPos2)
    If $anim = 1 Then
    $hoehe = 32
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\right.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 6 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\right1.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 9 Then
    $hoehe = 30
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\right2.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 12 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\right3.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 15 Then
    $hoehe = 32
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\lright4.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 18 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\right5.bmp")
    $anim +=5

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 21 Then
    $hoehe = 30
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\right6.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 24 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\right7.bmp")
    $anim = 0

    [/autoit] [autoit][/autoit] [autoit]

    Else
    $anim +=1
    EndIf
    $pPos1 = $pPos1+1
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _up()
    $hoehe = 29
    $richtung = 3
    GUICtrlSetPos($player, $pPos1, $pPos2-1)
    If $anim = 1 Then
    $hoehe = 32
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\up.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 6 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\up1.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 9 Then
    $hoehe = 30
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\up2.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 12 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\up3.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 15 Then
    $hoehe = 32
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\up4.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 18 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\up5.bmp")
    $anim +=5

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 21 Then
    $hoehe = 30
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\up6.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 24 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\up7.bmp")
    $anim = 0

    [/autoit] [autoit][/autoit] [autoit]

    Else
    $anim +=1
    EndIf
    $pPos2 = $pPos2-1
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _down()
    $hoehe = 29
    $richtung = 4
    GUICtrlSetPos($player, $pPos1, $pPos2+1)
    If $anim = 1 Then
    $hoehe = 32
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\down.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 6 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\down1.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 9 Then
    $hoehe = 30
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\down2.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 12 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\down3.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 15 Then
    $hoehe = 32
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\down4.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 18 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\down5.bmp")
    $anim +=5

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 21 Then
    $hoehe = 30
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\down6.bmp")
    $anim +=1

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $anim = 24 Then
    $hoehe = 31
    GUICtrlSetImage($player,@ScriptDir & "\Spiel BMP's\down7.bmp")
    $anim = 0

    [/autoit] [autoit][/autoit] [autoit]

    Else
    $anim +=1
    EndIf
    $pPos2 = $pPos2+1
    EndFunc

    [/autoit]
    Zitat

    Bisherige Bugs:

    • Münzen werden eingesammelt sobald man auf der selben X-Position wie die Münze ist
    • Bei Mausbewegung läuft die Figur schneller


    Und im Anhang sind die dazugehörigen Bilder (müssen in den selben Ordner wie das Script)

    2 Mal editiert, zuletzt von Kallinski (5. August 2009 um 19:33)

  • Die .rar haste entpackt oder? Also die Bilder müssen im Ordner "Spiel BMP's" bleiben xD Dann müsste es funktionieren, hat es aufjedenfall bei alle Leuten denen ich es geschickt habe^^

  • klaro habe ich es entpackt =)

    warum ahste den script nich auch glei mit rein gemacht ?^^

  • naja geht wenn dder script nich mit im ornder is lol ^^

    naja sieht lustig aus also ein fettes LOB =)

  • hehe xD

    dann gehste solche fragen wie meine erst gleich aus dem weg xD

    naja mache weiter so sieht echt schon funny aus =)

  • Ich lerne grade C++, und hoffe das nachdem Buch das ich kriege C++ für Spieleprogrammierer kriege :D
    Edit: Aber das Spiel ist gut gelungen :D

  • Sehr lustiges Spiel. Vielleicht solltest du dir nochmal das münzeinsammel script angucken. Denn öfters passierte mir das:

    [Blockierte Grafik: http://devilscry.kilu.de/bilder/snake.png]

    Ja das mit dem Münzeneinsammeln ist noch sehr Buggy, vllt kann sich jemand mal durch das Script kämpfen und mir Tipps geben wie ich dieses verbessern kann. Aber danke schonmal für die positive Kritik^^

  • Das ist ein weiterer Bug^^
    Werde die Bugs wahrscheinlin die Tage versuchen zu beheben^^

  • Gut gelungen. Auch wenn man einfach die x-Achse entlang gehen kann und damit die Münzen einsammelt. Wenn die Bugs behoben sind ist das bestimmt klasse. Du könntest auch noch einzelne Lvl machen wo man dann mehr Geschwindigkeit hat oder so .

    Für den Skript: :thumbup:

    MfG
    Conan (Nur Mitlesend)
    Schon lange dabei

  • Ja das mit dem Münze einsammeln ist bisher mein größtes Problem. Werde mich aufjedenfall noch dran setzen und versuche diesen zu beheben^^

  • Hi,
    hatte grad Lust was zu machen, da hab ich ein bisschen optimiert.

    Spoiler anzeigen
    [autoit]

    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    HotKeySet("{Up}", "_up")
    HotKeySet("{Down}", "_down")
    HotKeySet("{Right}", "_right")
    HotKeySet("{Left}", "_left")

    [/autoit] [autoit][/autoit] [autoit]

    Global $posarray[2][2] = [[Random(5, 573, 1), Random(24, 452, 1)],[Random(5, 573, 1), Random(24, 452, 1)]], $bufferarray[4], $score = 0, $speed = 5
    $mainform = GUICreate("Spiel", 593, 487)
    $scorelabel = GUICtrlCreateLabel("Punkte: " & $score, 15, 3, 200, 15)
    $muenze = GUICtrlCreatePic(@ScriptDir & "\gfx\muenze.jpg", $posarray[1][0], $posarray[1][1], 10, 10, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
    $player = GUICtrlCreatePic(@ScriptDir & "\gfx\down 1.jpg", $posarray[0][0], $posarray[0][1], 16, 31, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
    $playfield = GUICtrlCreatePic(@ScriptDir & "\gfx\spielfeld.jpg", 0, 20, 593, 467, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    If GUIGetMsg() = -3 Then Exit
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _left()
    If ($bufferarray[0] = 7) Then
    $bufferarray[0] = 0
    Else
    $bufferarray[0] += 1
    EndIf
    If ($posarray[0][0] > 5) Then
    $posarray[0][0] -= $speed
    If ((($posarray[0][0] >= $posarray[1][0] - 8) And ($posarray[0][0] <= $posarray[1][0] + 8)) And (($posarray[1][1] <= $posarray[0][1] + 32) And ($posarray[1][1] >= $posarray[0][1]))) Then point()
    GUICtrlSetImage($player, @ScriptDir & "\gfx\left " & $bufferarray[0] + 1 & ".jpg")
    refresh()
    EndIf
    EndFunc ;==>_left

    [/autoit] [autoit][/autoit] [autoit]

    Func _right()
    If ($bufferarray[1] = 7) Then
    $bufferarray[1] = 0
    Else
    $bufferarray[1] += 1
    EndIf
    If ($posarray[0][0] < 573) Then
    $posarray[0][0] += $speed
    If ((($posarray[0][0] >= $posarray[1][0] - 8) And ($posarray[0][0] <= $posarray[1][0] + 8)) And (($posarray[1][1] <= $posarray[0][1] + 32) And ($posarray[1][1] >= $posarray[0][1]))) Then point()
    GUICtrlSetImage($player, @ScriptDir & "\gfx\right " & $bufferarray[1] + 1 & ".jpg")
    refresh()
    EndIf
    EndFunc ;==>_right

    [/autoit] [autoit][/autoit] [autoit]

    Func _up()
    If ($bufferarray[2] = 7) Then
    $bufferarray[2] = 0
    Else
    $bufferarray[2] += 1
    EndIf
    If ($posarray[0][1] > 24) Then
    $posarray[0][1] -= $speed
    If ((($posarray[0][0] >= $posarray[1][0] - 8) And ($posarray[0][0] <= $posarray[1][0] + 8)) And (($posarray[1][1] <= $posarray[0][1] + 32) And ($posarray[1][1] >= $posarray[0][1]))) Then point()
    GUICtrlSetImage($player, @ScriptDir & "\gfx\up " & $bufferarray[2] + 1 & ".jpg")
    refresh()
    EndIf
    EndFunc ;==>_up

    [/autoit] [autoit][/autoit] [autoit]

    Func _down()
    If ($bufferarray[3] = 7) Then
    $bufferarray[3] = 0
    Else
    $bufferarray[3] += 1
    EndIf
    If ($posarray[0][1] < 452) Then
    $posarray[0][1] += $speed
    If ((($posarray[0][0] >= $posarray[1][0] - 8) And ($posarray[0][0] <= $posarray[1][0] + 8)) And (($posarray[1][1] <= $posarray[0][1] + 32) And ($posarray[1][1] >= $posarray[0][1]))) Then point()
    GUICtrlSetImage($player, @ScriptDir & "\gfx\down " & $bufferarray[3] + 1 & ".jpg")
    refresh()
    EndIf
    EndFunc ;==>_down

    [/autoit] [autoit][/autoit] [autoit]

    Func refresh()
    GUICtrlSetPos($player, $posarray[0][0], $posarray[0][1])
    GUICtrlSetPos($muenze, $posarray[1][0], $posarray[1][1])
    GUICtrlSetData($scorelabel, 'Punkte: ' & $score)
    EndFunc ;==>refresh

    [/autoit] [autoit][/autoit] [autoit]

    Func point()
    $score += 1
    $posarray[1][0] = Random(5, 573, 1)
    $posarray[1][1] = Random(24, 452, 1)
    refresh()
    EndFunc ;==>point

    [/autoit]