Lösung für Upgrade-System

  • GM 8
  • So, langsam reichts mir...

    [hide=player_shrimp]Information about object: player

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

    Keyboard Event for <Space> Key:
    if global.upgrade is equal to 1
    play sound shot; looping: false
    create instance of object shot at relative position (52,0) with speed 50 in direction 0
    if global.upgrade is equal to 2
    play sound shot; looping: false
    create instance of object shot at relative position (52,0) with speed 50 in direction 0
    create instance of object shot at relative position (52,0) with speed 50 in direction -15
    create instance of object shot at relative position (52,0) with speed 50 in direction 15
    if global.upgrade is equal to 3
    play sound shot; looping: false
    create instance of object shot at relative position (52,0) with speed 50 in direction 0
    create instance of object shot at relative position (52,0) with speed 50 in direction -15
    create instance of object shot at relative position (52,0) with speed 50 in direction 15
    create instance of object shot at relative position (52,0) with speed 50 in direction -30
    create instance of object shot at relative position (52,0) with speed 50 in direction 30
    if global.upgrade is equal to 4
    play sound shot; looping: false
    create instance of object shot_heavy at relative position (52,0) with speed 50 in direction 0
    create instance of object shot at relative position (52,0) with speed 50 in direction -15
    create instance of object shot at relative position (52,0) with speed 50 in direction 15
    create instance of object shot at relative position (52,0) with speed 50 in direction -30
    create instance of object shot at relative position (52,0) with speed 50 in direction 30

    Keyboard Event for <Left> Key:
    jump relative to position (-25,0)

    Keyboard Event for <Up> Key:
    jump relative to position (0,-25)

    Keyboard Event for <Right> Key:
    jump relative to position (25,0)

    Keyboard Event for <Down> Key:
    jump relative to position (0,25)

    Other Event: Outside View 0:
    execute code:

    x=xprevious;
    y=yprevious;


    Other Event: Outside View 1:
    execute code:

    x=xprevious;
    y=yprevious;


    Other Event: Outside View 2:
    execute code:

    x=xprevious;
    y=yprevious;


    Other Event: Outside View 3:
    execute code:

    x=xprevious;
    y=yprevious;


    Other Event: Outside View 4:
    execute code:

    x=xprevious;
    y=yprevious;


    Other Event: Outside View 5:
    execute code:

    x=xprevious;
    y=yprevious;[/hide]

    [hide=upgrade]Information about object: upgrade

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

    Collision Event with object player:
    if global.upgrade is equal to 1
    set variable global.upgrade to 2
    set the score relative to 25
    destroy the instance
    if global.upgrade is equal to 2
    set variable global.upgrade to 3
    set the score relative to 50
    destroy the instance
    if global.upgrade is equal to 3
    set variable global.upgrade to 4
    set the score relative to 75
    destroy the instance

    Other Event: Outside Room:
    destroy the instance

    Other Event: Room Start:
    set the horizontal speed to -3[/hide]

    [hide=scroller]Information about object: invisible_scroll

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

    Create Event:
    set variable global.upgrade to 1
    [/hide]

    Wo steckt der Fehler?
  • Benutzer online 1

    1 Besucher