hi,
ich hab gerade angefangen ein Strategy/Aufbauspiel zu bastellen. Ich hab mir vorher alles ausgedacht und wollte vollen tatendrang starten , doch schon nach wenigen minuten kam der erste harte fehler.und zwar wenn man sich über die karte bewegen will (vogelperspektive). Dabei muss man ja gezwungenermaßen die karte bewegen doch die besteht bei mir aus ca 10000 bildern da hab ich mir gedacht pack ich sie alle in eine Groupbox und verschieb diese einfach. leider funktioniert das so nicht. Ich bin mir zwar extrem sicher das ich das in früheren projekten auch so gemacht hab find diese aber leider nicht mehr :pinch: . Wie auch immer ich hab keine idee wie ich es sonst lösen könnte ausser alle einzeln zu verschieben... die sache soll ja ziemlich schnell gehn.
hat jemand ne idee ? freue mich über jede hilfe
hier noch der code wenns hilft (mit Pics im anhang)
Spoiler anzeigen
#include-once
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
;Hilfsvariablen
$Ctrl = 1
$Colision = 2
#Region ### START Koda GUI section ### Form=C:\Users\Geithe\Desktop\RTS Projekt\Form_Backup_001.kxf
$Form1 = GUICreate("Form1", 1264, 704, -1, -1)
$Group_Menu = GUICtrlCreateGroup("", -8, -8, 249, 737)
; interface....
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group_Game = GUICtrlCreateGroup("", 248, 0, 1017, 713)
$Group_Game_Map = GUICtrlCreateGroup("", 248, 0, 2000, 2000)
Dim $MapPos[2]
$MapPos[0] = 248
$MapPos[1] = 0
__CreateGameMap()
[/autoit] [autoit][/autoit] [autoit]GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
[/autoit] [autoit][/autoit] [autoit]If _IsPressed(41) Then
$MapPos[0] -= 10
GUICtrlSetPos($Group_Game_Map,$MapPos[0],$MapPos[1])
EndIf
WEnd
Func __CreateGameMap()
;Pos Count
$x = 1
$y = 1
Dim $Feld[100][101][3]
while $y <= 15
If $x <= 50 And $x > 0 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_green.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
If $x <= 70 And $x > 50 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_blue.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
If $x <= 85 And $x > 70 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_green.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
If $x <= 100 And $x > 85 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_green.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
$x += 1
If $x = 100 Then
$x = 1
$y += 1
EndIf
WEnd
while $y <= 20
If $x <= 50 And $x > 0 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_green.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
If $x <= 70 And $x > 50 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_blue.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
If $x <= 100 And $x > 70 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_green.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
$x += 1
If $x = 100 Then
$x = 1
$y += 1
EndIf
WEnd
while $y <= 30
If $x <= 5 And $x > 0 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_green.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
If $x <= 35 And $x > 5 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_gray.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
If $x <= 50 And $x > 35 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_green.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
If $x <= 70 And $x > 50 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_blue.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
If $x <= 70 And $x > 100 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_green.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
$x += 1
If $x = 100 Then
$x = 1
$y += 1
EndIf
WEnd
while $y <= 50
If $x <= 50 And $x > 0 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_green.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
If $x <= 100 And $x > 50 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_blue.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
$x += 1
If $x = 100 Then
$x = 1
$y += 1
EndIf
WEnd
while $y <= 65
If $x <= 100 And $x > 0 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_green.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
$x += 1
If $x = 100 Then
$x = 1
$y += 1
EndIf
WEnd
while $y <= 95
If $x <= 35 And $x > 0 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_blue.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
If $x <= 70 And $x > 35 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_green.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
If $x <= 85 And $x > 70 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_gray.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
If $x <= 100 And $x > 85 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_green.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
$x += 1
If $x = 100 Then
$x = 1
$y += 1
EndIf
WEnd
while $y <= 100
If $x <= 30 And $x > 0 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_blue.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
If $x <= 70 And $x > 100 Then $Feld[$x][$y][$Ctrl] = GUICtrlCreatePic(@ScriptDir & "\SKIN_full_green.bmp", 248 + (($x - 1) * 20), 5 + (($y - 1) * 20), 20, 20)
$x += 1
If $x = 100 Then
$x = 1
$y += 1
EndIf
WEnd
EndFunc