Figur hängt an jeder ecke Fest.

  • GM 7
  • Figur hängt an jeder ecke Fest.

    Nun, nun mein Figur hängt an fast jede Ecke des Wandes fest.
    Manchmal befreit sie sich von alleine, anderesmal bleibt es da hängen und dreht sich immer.
    Hier ist die Objektbeschreibung:
    Information about object: obj_police

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

    Create Event:
    execute code:

    if (room=menue)
    {
    path_start(path_pomenue,4,2,true)
    };
    if (room=room1)
    {
    path_start(path_po001,4,2,true)
    };
    if (room=room2)
    {
    path_start(path_po002,4,2,true)
    }
    attack = 0;
    go_back = 0;
    path_lastx = x;
    path_lasty = y;
    path_lastpos = path_position;
    go_back_ok = 0;

    Step Event:
    execute code:

    image_angle = direction;

    if !(collision_line(x,y,obj_dieb.x,obj_dieb.y,obj_Wand,1,1))
    {go_back_ok = 1;
    path_end();
    mp_linear_step_object(obj_dieb.x,obj_dieb.y,3.5,obj_Wand);
    go_back = 0;}
    else
    {if (go_back_ok = 1)
    {go_back = 1;}}

    if (go_back = 1) && !((x = path_lastx) && (y = path_lasty))
    {mp_potential_step_object(path_lastx,path_lasty,3,obj_Wand);}
    else if (go_back = 1) && ((x = path_lastx) && (y = path_lasty))
    {if (room = room1)
    {path_start(path_po001,3,1,1);}
    if (room = room2)
    {path_start(path_po002,3,1,1);}
    path_position = path_lastpos;
    go_back = 0;
    go_back_ok = 0;}

    Gibt es da eine gute Möglichkeit oder einen trick?
  • Wenn du nur ein einfarbiges Sprite machst, solltest du die Transparenz natürlich ausstellen. Wenn in du eine andere Form verwenden willst, zB Kreis, dann musst du Transparenz natürlich einschalten.
    Einige meiner Spiele:
  • Benutzer online 1

    1 Besucher