Hey,
Ich hätte gerne das meine Figur IMMER vor allen anderen Bildern in der GUI steht. Also das die Figur im Vordergrund ist.
Gibts da irgendwas dafür?
Mfg
Bilder vor andere Positionieren
-
- [ gelöst ]
-
Nakroma -
17. Februar 2012 um 22:45 -
Geschlossen -
Erledigt
-
-
GDI+? GUIImage? Als GUI? In Einem GUI? Bitte mehr Infos!!
In GDI+ musst du es einfach als letztes malen, da du dann über alles malst.
-
Steht da, in einer GUI
-
Zitat
Gibts da irgendwas dafür?
Ja!
-
Und was wenn ich fragen darf?
-
Und was wenn ich fragen darf?
Steht doch dort.GDI+? GUIImage?
In GDI+ musst du es einfach als letztes malen, da du dann über alles malst. -
Das Problem ist, ich erstell die Bilder(Wegen Laufbewegung)ja immer neu, also eig. immer NACH dem Gebäude, allerdings ist das Gebäude trotzdem immer vor der Figur
-
Hast du Code?
Wenn ja, posten bitte. -
Spoiler anzeigen
[autoit]#cs ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]AutoIt Version: 3.3.6.1
[/autoit] [autoit][/autoit] [autoit]
Author: NakromaScript Function:
[/autoit] [autoit][/autoit] [autoit]
FightEnginge for Wave RPG#ce ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]
Opt("GUIOnEventMode", 1)
#include <./au3/GDIpProgress.au3>$p_x = 300
[/autoit] [autoit][/autoit] [autoit]
$p_y = 300$e_x = 800
[/autoit] [autoit][/autoit] [autoit]
$e_y = 300$action = False
[/autoit] [autoit][/autoit] [autoit]
$stand = "right"
$enemystate = "live"HotKeySet("{ESC}", "close")
[/autoit] [autoit][/autoit] [autoit]
HotKeySet("d", "walk_right")
HotKeySet("a", "walk_left")
HotKeySet("w", "walk_up")
HotKeySet("s", "walk_down")
HotKeySet("{SPACE}", "sword")
HotKeySet("r", "fireball")$gui = GUICreate("Wave FightEngine", 1000, 864)
[/autoit] [autoit][/autoit] [autoit]
GUISetBkColor(0xFFFFFF)
$player = GUICtrlCreatePic("./poses/stand_right.gif", $p_x, $p_y, 24, 62)
$balken = GUICtrlCreatePic("./img/balken.gif", 0, 800, 1000, 64)
$w = GUICtrlCreatePic("./img/w.gif", 0, 800, 64, 64)
$progress1 = _ProgressCreate(70, 800, 200, 32, 0x3cb371)
$progress2 = _ProgressCreate(70, 832, 200, 32, 0x6495ed, 0x6495ed)
_ProgressSet($progress1, IniRead("./ini/stats.ini", "allgemein", "leben", 100))
_ProgressSet($progress2, IniRead("./ini/stats.ini", "allgemein", "mana", 100))
GUISetState(@SW_SHOW)
$mana = IniRead("./ini/stats.ini", "allgemein", "mana", 100)
$life = IniRead("./ini/stats.ini", "allgemein", "leben", 100)
read()
terrain_secretiland()While 1
[/autoit] [autoit][/autoit] [autoit]
WEndFunc close()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFuncFunc walk_right()
[/autoit] [autoit][/autoit] [autoit]
If $action = False Then
$action = True
$p_x += 10
If $p_x > 976 Then $p_x = 976
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/walk_right_right.gif", $p_x, $p_y, 24, 62)
$p_x += 10
If $p_x > 976 Then $p_x = 976
Sleep(100)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/walk_right_left.gif", $p_x, $p_y, 24, 62)
Sleep(100)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/stand_right.gif", $p_x, $p_y, 24, 62)
$stand = "right"
$action = False
Else
Return
EndIf
EndFuncFunc walk_left()
[/autoit] [autoit][/autoit] [autoit]
If $action = False Then
$action = True
$p_x -= 10
If $p_x < 0 Then $p_x = 0
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/walk_left_right.gif", $p_x, $p_y, 24, 62)
$p_x -= 10
If $p_x < 0 Then $p_x = 0
Sleep(100)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/walk_left_left.gif", $p_x, $p_y, 24, 62)
Sleep(100)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/stand_left.gif", $p_x, $p_y, 24, 62)
$stand = "left"
$action = False
Else
Return
EndIf
EndFuncFunc walk_up()
[/autoit] [autoit][/autoit] [autoit]
If $action = False Then
$action = True
$p_y -= 10
If $p_y < 0 Then $p_y = 0
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/walk_up_right.gif", $p_x, $p_y, 32, 62)
$p_y -= 10
If $p_y < 0 Then $p_y = 0
Sleep(100)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/walk_up_left.gif", $p_x, $p_y, 32, 62)
Sleep(100)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/stand_up.gif", $p_x, $p_y, 32, 62)
$stand = "up"
$action = False
Else
Return
EndIf
EndFuncFunc walk_down()
[/autoit] [autoit][/autoit] [autoit]
If $action = False Then
$action = True
$p_y += 10
If $p_y > 738 Then $p_y = 738
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/walk_down_right.gif", $p_x, $p_y, 32, 62)
$p_y += 10
If $p_y > 738 Then $p_y = 738
Sleep(100)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/walk_down_left.gif", $p_x, $p_y, 32, 62)
Sleep(100)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/stand_down.gif", $p_x, $p_y, 32, 62)
$stand = "down"
$action = False
Else
Return
EndIf
EndFuncFunc sword()
[/autoit] [autoit][/autoit] [autoit]
If $action = False Then
If $stand = "left" Then
$action = True
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/attack/left_sword1.gif", $p_x, $p_y, 52, 62)
Sleep(80)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/attack/left_sword2.gif", $p_x, $p_y, 48, 62)
Sleep(80)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/attack/left_sword3.gif", $p_x, $p_y, 32, 62)
Sleep(80)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/attack/left_sword4.gif", $p_x - 25, $p_y, 60, 62)
get_sword($p_x - 25, $p_y, 60, 62, $e_x, $e_y, 24, 62)
Sleep(80)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/attack/left_sword5.gif", $p_x - 29, $p_y, 64, 62)
get_sword($p_x - 29, $p_y, 64, 62, $e_x, $e_y, 24, 62)
Sleep(80)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/attack/left_sword6.gif", $p_x - 23, $p_y, 58, 62)
get_sword($p_x - 23, $p_y, 58, 62, $e_x, $e_y, 24, 62)
Sleep(80)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/stand_left.gif", $p_x, $p_y, 24, 62)
$action = False
ElseIf $stand = "right" Then
$action = True
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/attack/right_sword1.gif", $p_x - 27, $p_y, 52, 62)
Sleep(80)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/attack/right_sword2.gif", $p_x - 21, $p_y, 48, 62)
Sleep(80)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/attack/right_sword3.gif", $p_x, $p_y, 32, 62)
Sleep(80)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/attack/right_sword4.gif", $p_x, $p_y, 60, 62)
get_sword($p_x, $p_y, 60, 62, $e_x, $e_y, 24, 62)
Sleep(80)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/attack/right_sword5.gif", $p_x, $p_y, 64, 62)
get_sword($p_x, $p_y, 64, 62, $e_x, $e_y, 24, 62)
Sleep(80)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/attack/right_sword6.gif", $p_x, $p_y, 58, 62)
get_sword($p_x, $p_y, 58, 62, $e_x, $e_y, 24, 62)
Sleep(80)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/stand_right.gif", $p_x, $p_y, 24, 62)
$action = False
EndIf
Else
Return
EndIf
EndFuncFunc fireball()
[/autoit] [autoit][/autoit] [autoit]
If $action = False Then
If mana_take(10) = False Then Return
If $stand = "right" Then
$action = "true"
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/attack/right_fire.gif", $p_x, $p_y, 40, 62)
Sleep(100)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/stand_right.gif", $p_x, $p_y, 24, 62)
$s_x = $p_x + 24
$spell = GUICtrlCreatePic("./poses/attack/fireball_right.gif", $s_x, $p_y, 51, 31)
For $i = 0 To 20
Sleep(20)
$s_x += 10
GUICtrlSetPos($spell, $s_x, $p_y)
Next
GUICtrlDelete($spell)
ElseIf $stand = "left" Then
$action = "true"
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/attack/left_fire.gif", $p_x, $p_y, 40, 62)
Sleep(100)
GUICtrlDelete($player)
$player = GUICtrlCreatePic("./poses/stand_left.gif", $p_x, $p_y, 24, 62)
$s_x = $p_x - 24
$spell = GUICtrlCreatePic("./poses/attack/fireball_left.gif", $s_x, $p_y, 51, 31)
For $i = 0 To 20
Sleep(20)
$s_x -= 10
GUICtrlSetPos($spell, $s_x, $p_y)
Next
GUICtrlDelete($spell)
EndIf
$action = False
Else
Return
EndIf
EndFunc;~ Func zombie()
[/autoit] [autoit][/autoit] [autoit]
;~ If $enemystate = "live" Then
;~ $e_x -= 10
;~ If $e_x < 0 Then $e_x = 0
;~ GUICtrlDelete($enemy)
;~ $enemy = GUICtrlCreatePic("./poses/enemy/zombie/walk_left_right.gif", $e_x, $e_y, 24, 62)
;~ $e_x -= 10
;~ If $e_x < 0 Then $e_x = 0
;~ Sleep(150)
;~ GUICtrlDelete($enemy)
;~ $enemy = GUICtrlCreatePic("./poses/enemy/zombie/walk_left_left.gif", $e_x, $e_y, 24, 62)
;~ Sleep(150)
;~ GUICtrlDelete($enemy)
;~ $enemy = GUICtrlCreatePic("./poses/enemy/zombie/stand_left.gif", $e_x, $e_y, 24, 62)
;~ Sleep(1000)
;~ Else
;~ Return
;~ EndIf
;~ EndFuncFunc get_sword($x1, $y1, $b1, $h1, $x2, $y2, $b2, $h2)
[/autoit] [autoit][/autoit] [autoit]
If ($x1 + $b1 > $x2 And $y1 + $h1 > $y2 And $x1 < $x2 + $b2 And $y1 < $y2 + $h2) Then
If $enemystate = "live" Then
GUICtrlDelete($enemy)
$enemy = GUICtrlCreatePic("./poses/enemy/zombie/death1.gif", $e_x, $e_y + 42, 64, 24)
$enemystate = "death"
EndIf
Else
Return
EndIf
EndFuncFunc mana_take($take)
[/autoit] [autoit][/autoit] [autoit]
If $mana - $take < 0 Then
Return False
Else
Return True
$mana -= $take
write()
EndIf
EndFuncFunc read()
[/autoit] [autoit][/autoit] [autoit]
$mana = IniRead("./ini/stats.ini", "allgemein", "mana", 100)
$life = IniRead("./ini/stats.ini", "allgemein", "leben", 100)
EndFuncFunc write()
[/autoit] [autoit][/autoit] [autoit]
IniWrite("./ini/stats.ini", "allgemein", "mana", $mana)
IniWrite("./ini/stats.ini", "allgemein", "leben", $life)
_ProgressSet($progress1, IniRead("./ini/stats.ini", "allgemein", "leben", 100))
_ProgressSet($progress2, IniRead("./ini/stats.ini", "allgemein", "mana", 100))
EndFuncFunc terrain_secretiland()
[/autoit]
$house1 = GUICtrlCreatePic("./terrain/haus1.gif", 500, 500, 152, 272)
EndFuncIch will das Männchen(Player)vor House1 haben