[9] Let's Make a Godot Space Shooter: Firing Cooldown

Sdílet
Vložit
  • čas přidán 24. 07. 2020
  • We delay the firing of our bullets to add a fire cooldown effect to the ship! Let’s Make a Godot Space Shooter together - a series covering basic Godot concepts and workflows to create a full PC, mobile, and controller-supported game!
    See my website (source code link available per-episode!): codenmore.github.io/
    Follow me on Twitter - @CodeNMore - / codenmore
    Teaching to understand all subjects to the fullest extent!
    Thumbnail: Godot Logo (C) Andrea Calabró Distributed under the terms of the Creative Commons Attribution License version 3.0 (CC-BY 3.0). creativecommons.org/licenses/....
  • Jak na to + styl

Komentáře • 19

  • @lukeydoo
    @lukeydoo Před 9 měsíci +1

    Another thing you can do is change 'Input.is_action_pressed()' to 'Input.is_action_just_pressed()' which makes it so only one bullet gets shot everytime you press the button. You can't hold it down to keep shooting though.

  • @wienerbrod9119
    @wienerbrod9119 Před rokem +2

    In case anyone has a problem with the timer not finishing, make sure to enable "one shot" in the timer node settings

  • @jimmyu4829
    @jimmyu4829 Před 2 lety

    Man, I'm so thankful for these videos. I love how you break down and explain what's happening and don't just give us the code to use and forget later. Keep up the good work and thanks a lot!

  • @lemetamax
    @lemetamax Před 3 lety +2

    So much knowledge!!😁 Nice tutorial as always.

  • @thienhuynh3279
    @thienhuynh3279 Před 3 lety

    keep it up!! ur video is very helpful and worth to watch. I wish u all the best and release more tutorials of godit !

  • @adamsmith7719
    @adamsmith7719 Před 3 lety

    Super appreciate the tutorial! This was super helpful

  • @Tenkite001
    @Tenkite001 Před rokem

    Dude i love u, i Washington searching how to do it for so long thanks !
    (It work on godot 4 btw)

  • @geckokun2805
    @geckokun2805 Před 2 lety

    You just saved my ass. Thank you so much!

  • @shrippie-4214
    @shrippie-4214 Před 2 lety

    Thanks bro

  • @jroseme
    @jroseme Před rokem

    Weird bug I experienced..updating the fireDelay in script wasn't doing anything. Once I messed with the fireDelay in Inspector...seemed to fix whatever was going on.

  • @user-ke3st6jn9g
    @user-ke3st6jn9g Před 3 lety +1

    I try to use wait time in Timer, not define firedely in code. It seems also OK

  • @pol9571
    @pol9571 Před 3 lety +1

    Hi. What if i want to shoot the bullets in where my character/player is facing? how would I do it?

  • @johnn1199
    @johnn1199 Před 6 měsíci

    This tutorial has been great, even though it's several years old now and some things within Godot have changed. I seem to have bodged this step though; can't get the Timer to work. I've probably done something stupid, but does anyone have any ideas? The debugger is returning nothing. EDIT: Yep, being stupid. Left out the closed brackets after ".is_stopped():"

  • @yashrajbasan4097
    @yashrajbasan4097 Před 3 lety +4

    better to use Input.is_action_just_pressed

  • @rfvdnsyt-teamtactics6107

    Error on the firedekaycode

  • @user-ki4hk2fk2z
    @user-ki4hk2fk2z Před 3 lety +1

    I'm first

  • @diniszhu3845
    @diniszhu3845 Před 2 lety

    hey, i need help

  • @vermiman
    @vermiman Před 3 lety

    if Input.is_action_pressed("shoot") and fireDelayTimer.is_stopped():
    for child in firingPositions.get_children():
    if child.functioning:
    fireDelayTimer.start(fireDelay)
    var bullet = plBullet.instance()
    bullet.global_position = child.global_position
    get_tree().current_scene.add_child(bullet)

  • @geckokun2805
    @geckokun2805 Před 2 lety

    You just saved my ass. Thank you so much!