Bilder vor andere Positionieren

  • 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

    Einmal editiert, zuletzt von Nakroma (19. Februar 2012 um 16:17)

  • 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.

    mfg BB

    "IF YOU'RE GOING TO KILL IT
    OPEN SOURCE IT!"

    by Phillip Torrone

    Zitat von Shoutbox

    [Heute, 11:16] Andy: ....böseböseböseböse....da erinnere ich mich daran, dass man den Puschelschwanz eines KaRnickels auch "Blume" nennt....ob da eins zum anderen passt? :rofl: :rofl: :rofl: :rofl:

    https://autoit.de/index.php?page…leIt#post251138

    Neon Snake

  • Zitat

    Gibts da irgendwas dafür?

    Ja!

  • Spoiler anzeigen
    [autoit]

    #cs ----------------------------------------------------------------------------

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

    AutoIt Version: 3.3.6.1
    Author: Nakroma

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

    Script Function:
    FightEnginge for Wave RPG

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

    #ce ----------------------------------------------------------------------------
    Opt("GUIOnEventMode", 1)
    #include <./au3/GDIpProgress.au3>

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

    $p_x = 300
    $p_y = 300

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

    $e_x = 800
    $e_y = 300

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

    $action = False
    $stand = "right"
    $enemystate = "live"

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

    HotKeySet("{ESC}", "close")
    HotKeySet("d", "walk_right")
    HotKeySet("a", "walk_left")
    HotKeySet("w", "walk_up")
    HotKeySet("s", "walk_down")
    HotKeySet("{SPACE}", "sword")
    HotKeySet("r", "fireball")

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

    $gui = GUICreate("Wave FightEngine", 1000, 864)
    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()

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

    While 1
    WEnd

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

    Func close()
    Exit
    EndFunc

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

    Func walk_right()
    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
    EndFunc

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

    Func walk_left()
    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
    EndFunc

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

    Func walk_up()
    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
    EndFunc

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

    Func walk_down()
    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
    EndFunc

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

    Func sword()
    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
    EndFunc

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

    Func fireball()
    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

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

    ;~ Func zombie()
    ;~ 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
    ;~ EndFunc

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

    Func get_sword($x1, $y1, $b1, $h1, $x2, $y2, $b2, $h2)
    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
    EndFunc

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

    Func mana_take($take)
    If $mana - $take < 0 Then
    Return False
    Else
    Return True
    $mana -= $take
    write()
    EndIf
    EndFunc

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

    Func read()
    $mana = IniRead("./ini/stats.ini", "allgemein", "mana", 100)
    $life = IniRead("./ini/stats.ini", "allgemein", "leben", 100)
    EndFunc

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

    Func write()
    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))
    EndFunc

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

    Func terrain_secretiland()
    $house1 = GUICtrlCreatePic("./terrain/haus1.gif", 500, 500, 152, 272)
    EndFunc

    [/autoit]

    Ich will das Männchen(Player)vor House1 haben