Probleme, Probleme

  • Probleme, Probleme

    Hallo
    ich hab ein problem mit meinen Spielen:

    Ich hab bei meinem Bear Spiel ne Waffe einbauen wollen, aber das funzt net
    es sagt immer das es keine Variable can_shoot gibt, wenn ich schiessen will.
    hier die obj information vom Player:

    Information about object: PLAYER

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

    Create Event:
    execute code:

    global.can_shoot=0
    global.Left=0
    at position (0,1) draw the number of lives with caption Lives:
    set the number of lives to 3
    at position (0,10) draw the value of score with caption Score:
    set the information in the window caption:
    show score with caption score:
    show lives with caption lives:
    don't show health with caption health:
    set the mouse cursor to sprite sprite37 and don't show the windows cursor
    sleep 1000 milliseconds; redrawing the screen: true
    create a large effect of type ellipse at (2*hspeed,2*vspeed) of color 255 below objects
    create a large effect of type ring at (2*hspeed,2*vspeed) of color 255 below objects
    create a large effect of type star at (2*hspeed,2*vspeed) of color 255 below objects
    create a large effect of type spark at (2*hspeed,2*vspeed) of color 255 below objects

    Step Event:
    if relative position (0,1) is collision free for Only solid objects
    set the gravity to 0.5 in direction 270
    else
    set the gravity to 0 in direction 270
    if vspeed is larger than 12
    set variable vspeed to 12

    Collision Event with object ground:
    move in direction direction at most 12 till a contact with solid objects
    set the vertical speed to 0

    Collision Event with object GHOST:
    set the sprite to sprite24 with subimage 0 and speed 1
    sleep 500 milliseconds; redrawing the screen: true
    set the sprite to sprite23 with subimage 0 and speed 1
    sleep 500 milliseconds; redrawing the screen: true
    set the sprite to sprite24 with subimage 0 and speed 1
    sleep 500 milliseconds; redrawing the screen: true
    set the sprite to sprite23 with subimage 0 and speed 1
    for other object: destroy the instance
    set the number of lives relative to -1
    jump to the start position

    Collision Event with object Finish:
    if next room exists
    go to next room with transition effect <no effect>
    else
    show the highscore table
    background: <undefined>
    show the border
    new color: 255, other color: 0
    Font: "Times New Roman",10,0,0,0,0,0
    go to room room1 with transition effect <no effect>

    Collision Event with object Honig:
    set the score relative to 5
    play sound sound4; looping: false
    for other object: destroy the instance

    Collision Event with object ground2:
    move in direction direction at most 12 till a contact with solid objects
    set the vertical speed to 0

    Collision Event with object water:
    set the number of lives relative to -1
    jump to the start position

    Collision Event with object wapon:
    execute code:

    global.can_shoot=1
    for other object: destroy the instance

    Collision Event with object wapon red:
    execute code:

    global.can_shoot=1
    for other object: destroy the instance

    Keyboard Event for <Space> Key:
    if can_shoot is equal to 1
    if Left is equal to 1
    play sound sound2; looping: false
    create instance of object shoot at relative position (0,0)
    else
    play sound sound2; looping: false
    create instance of object shoot right at relative position (0,0)

    Keyboard Event for <Left> Key:
    if relative position (-4,0) is collision free for Only solid objects
    move relative to position (-4,0)
    set the sprite to sprite23 with subimage 0 and speed 1
    execute code:

    global.Left=1

    Keyboard Event for <Up> Key:
    if relative position (0,1) gives a collision with Only solid objects
    set the vertical speed to -10

    Keyboard Event for <Right> Key:
    if relative position (4,0) is collision free for Only solid objects
    move relative to position (4,0)
    set the sprite to sprite23 with subimage 0 and speed 1
    execute code:

    global.Left=0

    Keyboard Event for C-key Key:
    clear the highscore table

    Keyboard Event for F-key Key:
    create a large effect of type ellipse at (2*hspeed,2*vspeed) of color 255 below objects
    create a large effect of type ring at (2*hspeed,2*vspeed) of color 255 below objects
    create a large effect of type star at (2*hspeed,2*vspeed) of color 255 below objects
    create a large effect of type spark at (2*hspeed,2*vspeed) of color 255 below objects

    Keyboard Event for S-key Key:
    save the game in the file savegame

    Other Event: Outside Room:
    set the number of lives relative to -1
    jump to the start position

    Other Event: No More Lives:
    show the highscore table
    background: <undefined>
    show the border
    new color: 255, other color: 0
    Font: "Times New Roman",10,0,0,0,0,0
    go to room room1 with transition effect <no effect>

    Key Press Event for F8 Key:
    if sound sound3 is playing
    stop sound sound3
    else
    play sound sound3; looping: false

    g Knuckles12