figur kann sich nicht bewegen

  • figur kann sich nicht bewegen

    Hallo
    bei meinem neuen Spiel in J&R Perspektive kann sich meine figur irgendwie nicht bewegen Hier ist die informatio darüber:
    Spoiler anzeigen
    Information about object: obj_Tropfen

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

    Create Event:
    set variable a to 1
    create instance of object obj_Waffe1 at relative position (0,0)
    set variable global.bewegen to 0
    set the mouse cursor to sprite spr_Fadenkreuz and don't show the windows cursor

    Step Event:
    if relative position (0,-1) is collision free for Only solid objects
    if a is equal to 1
    set the vertical speed to 0.5

    Collision Event with object obj_Block:
    if a is equal to 0
    set the gravity to 0 in direction 270
    set the vertical speed to 0
    set the horizontal speed to 0
    set variable global.bewegen to 0
    set variable a to 1

    Keyboard Event for W-key Key:
    if a is equal to 1
    set the horizontal speed to 0
    if global.schauen is equal to "r"
    if global.bewegen is equal to 1
    set the horizontal speed to 3
    if global.schauen is equal to "l"
    if global.bewegen is equal to 1
    set the horizontal speed to -3
    set the vertical speed to -10
    set the gravity to 0.5 in direction 270
    set variable a to 0

    Mouse Event for Glob Right Pressed:
    for all obj_Waffe1: destroy the instance
    for all obj_waffe2: destroy the instance

    Key Press Event for A-key Key:
    set variable global.schauen to "l"
    set the sprite to spr_Tropfen_Links with subimage 0 and speed 1
    if a is equal to 1
    start moving in directions 000100000 with speed set to 4
    set variable global.bewegen to 1
    else
    if hspeed is smaller than 4
    set the horizontal speed to -3

    Key Press Event for D-key Key:
    set variable global.schauen to "r"
    set the sprite to spr_Tropfen_Rechts with subimage 0 and speed 1
    if a is equal to 1
    start moving in directions 000001000 with speed set to 4
    set variable global.bewegen to 1
    else
    if hspeed is smaller than 4
    set the horizontal speed to 3

    Key Release Event for A-key Key:
    if a is equal to 1
    start moving in directions 000010000 with speed set to 0
    set variable global.bewegen to 0

    Key Release Event for D-key Key:
    if a is equal to 1
    start moving in directions 000010000 with speed set to 0
    set variable global.bewegen to 0
    kommt in die beste stadt der welt die welt von mir und einnel
    Fabrik eröffnen
    einziehen
    transport steigern
    Copyboy's Magischer Münz Automat:

    Meine Internet seite mit Lord-Belail und Einnel kommt rein ich erwarte euch^^

    I am a according to the gml n00b test!
  • Das funktioniert nich
    kommt in die beste stadt der welt die welt von mir und einnel
    Fabrik eröffnen
    einziehen
    transport steigern
    Copyboy's Magischer Münz Automat:

    Meine Internet seite mit Lord-Belail und Einnel kommt rein ich erwarte euch^^

    I am a according to the gml n00b test!

  • Collision Event with object obj_Block:
    if a is equal to 0
    set the gravity to 0 in direction 270
    set the vertical speed to 0
    set the horizontal speed to 0

    set variable global.bewegen to 0
    set variable a to 1

    Key Press Event for A-key Key:
    set variable global.schauen to "l"
    set the sprite to spr_Tropfen_Links with subimage 0 and speed 1
    if a is equal to 1
    start moving in directions 000100000 with speed set to 4
    set variable global.bewegen to 1
    else
    if hspeed is smaller than 4
    set the horizontal speed to -3
    Soweit ich weiß, soll der Held ja auf einen Block stehen, wenn du aber ihn auf den Block stehen lässt, und dabei die horizontale geschwindigkeit auf 0 stellst, womit man sich bei dir ja bewegt, kann dies auch nich funktionieren

    Müsste eigentlich das Problem sein

    Edit:
    Warum benutzt du eigentlich hspeed und die D&D Funktion "start moving" gleichzeitig???

    MFG
    Metalknight

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Metalknight ()

  • ja ich weiss aber ich hab das extra so gemacht das die hspeed nur EINMAL auf 0 gesetzt wird nähmlich wenn er aufkommt...
    kommt in die beste stadt der welt die welt von mir und einnel
    Fabrik eröffnen
    einziehen
    transport steigern
    Copyboy's Magischer Münz Automat:

    Meine Internet seite mit Lord-Belail und Einnel kommt rein ich erwarte euch^^

    I am a according to the gml n00b test!