Solid stimmt etwas nicht...

  • GM 8
  • Solid stimmt etwas nicht...

    Hallo,

    ich habe nähmlich neues problem, ich glaube, die Bild hilft das weiter:



    Wie ihr sieht, stimmt Solid nicht richtig, also die Objekt ist ÜBER die Solid (Linkes Bild) oder die Object stoppt schon, obwohl ich noch nicht Solid anrühre (Rechtes Bild)
    Ich glaube, das liegt an Dunkelheitprobleme, hier den Skript:

    Create:

    Quellcode

    1. sprite_set_alpha_from_sprite(Erde,Licht)
    2. sprite_set_alpha_from_sprite(Grass,Licht)
    3. global.cursor_x=mouse_x
    4. global.cursor_y=mouse_y
    5. global.torch=1
    6. alpha=surface_create(view_wview,view_hview)


    Step:

    Quellcode

    1. if global.torch=1
    2. {
    3. surface_set_target(alpha)
    4. draw_clear(c_black)// MAKE THE SURFACE BLACK
    5. draw_set_blend_mode(bm_add)
    6. draw_sprite_ext(Licht,0,Player1.x-view_xview,Player1.y-view_yview,1.5,2,global.dir,c_white,0.8) // ADD THE FIRST ALPHA SPRITE ( THE TORCH)
    7. draw_sprite_ext(Licht2,0,Player1.x-view_xview,Player1.y-view_yview,0.3,0.3,0,c_white,0.8)// ADD A LITTLE GLOW ROUND THE CHAR
    8. draw_set_blend_mode(bm_normal)
    9. surface_reset_target()
    10. }


    Draw:

    Quellcode

    1. global.cursor_x=mouse_x
    2. global.cursor_y=mouse_y
    3. if global.cursor_x>view_xview+view_wview
    4. global.cursor_x=view_xview+view_wview
    5. if global.cursor_x<view_xview
    6. global.cursor_x=view_xview
    7. if global.cursor_y>view_yview+view_hview
    8. global.cursor_y=view_yview+view_hview
    9. if global.cursor_y<view_yview
    10. global.cursor_y=view_yview
    11. if global.torch=1
    12. {
    13. draw_set_blend_mode_ext(bm_dest_color,bm_zero)
    14. draw_surface(alpha,view_xview,view_yview)// BLEND THE SURFACE WITH THE VIEW, EXACTLY LIKE AN ALPHA SPRITE
    15. draw_set_blend_mode(bm_normal)
    16. }
    17. if keyboard_check_pressed(ord('1'))
    18. global.torch=1
    19. if keyboard_check_pressed(ord('0'))
    20. global.torch=0
    Alles anzeigen


    Ich hoffe, das dieser Problem bald gelöst wird...

    Gruuß, yan.h
    Ihr stinkt.
  • Benutzer online 1

    1 Besucher