Score, Lives

  • GM 8
  • Score, Lives

    Hallo zusammen!

    Ich hab von yoyogames.com ein Tutorial heruntergeladen, und hab dort den Balken für Scors (Punkte) und für Lives (Leben) in mein Spiel übernommen. Nun, ich hab ihn 1:1 übernommen, im Tutorial funktionierts und bei mir nicht. Die Scors funktionieren wunderbar, doch die Leben werden nicht angezeigt!

    Hier die Show-Information vom Balken:




    Information about object: object35

    Sprite: <no sprite>
    Solid: false
    Visible: true
    Depth: 0
    Persistent: false
    Parent: <no parent>
    Mask: <same as sprite>

    Other Event: Game Start:
    set the number of lives to 3
    set the information in the window caption:
    don't show score with caption score:
    don't show lives with caption lives:
    don't show health with caption health:

    Other Event: No More Lives:
    show the highscore table
    background: level1
    show the border
    new color: 255, other color: 0
    Font: "Times New Roman",10,0,0,0,0,0
    restart the game

    Draw Event:
    set the drawing color to 65408
    draw rectangle with vertices (view_xview+5,view_yview+5) and (view_xview+100,view_yview+45), filled
    set the drawing color to 0
    draw rectangle with vertices (view_xview+5,view_yview+5) and (view_xview+100,view_yview+45), outline
    draw the lives at (view_xview+10,view_yview+10) with sprite spirit_life
    at position (view_xview+10,view_yview+28) draw the value of score with caption Score:



    Danke!
    :thumbsup:
  • Haste des per drag and drop gemacht oder mit codes

    weil ich fände codes viel einfacher zum lesen und interprestieren als diese object informations
    Ich will wie mein Opa im Schlaf sterben, nicht heulend und schreiend wie sein Beifahrer.





    I am a in the GM Quiz! :heul: :vogel:

    :gmlove:

    xD
  • Huhuuu..

    Wenn du es per Drag&Drop gemacht haben solltest musst du beachten das
    die Draw Funktionen auch im Draw Event sind:
    Draw the Life as Image.
    view_xview+1
    view_yview+1
    sprite21

    Du machst also über Drag&Drop die Funktion:
    Draw the Live as Image!!
    Bei mir habe ich dort:
    view_xview+1
    view_yview+1
    stehen...
    Und dann noch das Sprite...
    Versuch einfach mal ein bisschen rum :D
    @7rust-dev
  • Lucke 01 schrieb:

    solltest musst du beachten das
    die Draw Funktionen auch im Draw Event sind:


    Draw Event:
    set the drawing color to 65408
    draw rectangle with vertices (view_xview+5,view_yview+5) and (view_xview+100,view_yview+45), filled
    set the drawing color to 0
    draw rectangle with vertices (view_xview+5,view_yview+5) and (view_xview+100,view_yview+45), outline
    draw the lives at (view_xview+10,view_yview+10) with sprite spirit_life
    at position (view_xview+10,view_yview+2 draw the value of score with caption Score:


    Öhm da steht doch das er das im Draw event getan hat oO
    :saint: