Can someone help me for my shooter game?

You have enough examples that you can start making whatever changes you want.

I’ll try it!

Let’s see what happens!

How can I make a sprite deleted in Codea? E.g. that they place a character boy - sprite in the middle, and after 3 seconds this sprite is deleted


viewer.mode=FULLSCREEN

function setup()
    count=0   
end

function draw()
    background(0)
    if count<180 then   -- 60 frames per second * 3 sec
        count=count+1
        sprite(asset.builtin.Planet_Cute.Character_Boy,WIDTH/2, HEIGHT/2)
    end
end


WachenX = 900
WachenY = 700

shootX = x
shootY = y

WshootX = WachenX
WshootY = WachenY

WachenLeben = 1
if Training then
        background(77)  
        sprite(asset.builtin.UI.Blue_Button10, 850, 100, 100)
        if not nicht then 
        shootX = shootX + 30
    end 
        
        sprite(asset.builtin.Planet_Cute.Character_Boy,x,y) 
        
        if not loeschen then
    sprite(asset.builtin.Planet_Cute.Character_Horn_Girl, WachenX, WachenY, 100)
            end
        fill(255, 14, 0)
        text(WachenLeben, WachenX, WachenY)
        fill(37, 0, 255)
        fontSize(20)
        text(SpielerLeben, 100, 100)
        sprite(asset.builtin.Planet_Cute.Brown_Block, 150, 715, 100)
        sprite(asset.builtin.Space_Art.Green_Bullet, WshootX, WshootY)
        Counter = Counter + 1      
        WshootX = WshootX - 40
    
        if Counter > 60 then
            WshootX = WachenX
            
            Counter = 0
        end
        
        --Los Angeles Jugend Johann Game Timeddd.  dieser ext. stante EinfaäÄVH Ähier. 
        checkCollide() 
    end
    
    
    
    sprite(asset.builtin.UI.Blue_Tick, shootX, shootY) 
    
    
 
    
    if RND == "Tod" then
       background(0)
        fill(255, 14, 0) 
        ellipse(100,100)
        text("Wird ins Krankenhaus verlagert..", 500, 400)
    end
    
    if RND == "Kill" then
       sprite(asset.builtin.Planet_Cute.Shadow_North_East, WachenX, WachenY, 100)
        loeschen = true
        WachenX_sgk = 0 
        Wshoot = WachenX
    end

    
    function shooting()
    shootX = shootX + 30
    nicht = false
    shootY = y
   
        
end
 
if SpielerLeben then
    background(0)
end

I just can’t get the guard to shoot the player correctly (so the guard should shoot in the direction of the player)