Hello! Please help me what to do if the flashlight only works when you hold the button and if the camera moves the flashlight turns off, what should I do?
If you want to make it toggle on and off, you can make a new bool variable and change the if statements it would look something like this var toggle = false func input(): if input.is_action_pressed("toggle") and toggle == false: toggle = true elif input.is_action_pressed("toggle") and toggle == true: toggle = false func process(): if toggle == true: $spotlight.energy = 16 else: $spotlight.energy = 0
@@CrowGamesDev And how many indents should be made in the line if input.is_action_pressed("toggle") and toggle == false: and elif input.is_action_pressed("toggle") and toggle == true:?
I've heard of that, wasn't it a Spider-Man game that used that technique? I don't know much about it since I haven't ever used it sorry if I ever do ill make a video about it :)
Hai... saya dari Indonesia. Bisakah kamu membuat tutorial tentang bagaimana membuat kondisi seakan kita sedang berjalan di dalam hutan seperti di dalam permainan pertempuran. Terima kasih
Hello! Please help me what to do if the flashlight only works when you hold the button and if the camera moves the flashlight turns off, what should I do?
If you want to make it toggle on and off, you can make a new bool variable and change the if statements it would look something like this
var toggle = false
func input():
if input.is_action_pressed("toggle") and toggle == false:
toggle = true
elif input.is_action_pressed("toggle") and toggle == true:
toggle = false
func process():
if toggle == true:
$spotlight.energy = 16
else:
$spotlight.energy = 0
@@CrowGamesDev And how many indents should be made in the line if input.is_action_pressed("toggle") and toggle == false: and elif input.is_action_pressed("toggle") and toggle == true:?
@@MaksimkaTop4ik Just one
Hi 👋, could you please post a video about parallax windows or fake interiors?
I've heard of that, wasn't it a Spider-Man game that used that technique? I don't know much about it since I haven't ever used it sorry if I ever do ill make a video about it :)
@CrowGamesDev Yes, it was used in the Spider-Man 2 game. I think it helps to make the buildings look more realistic in games, thanks 🙏🙏🙏
awesome! Thanks
hello how about 2d ?
Check out a 2d flashlight tutorial, and the battery part should be similar.
Hai... saya dari Indonesia. Bisakah kamu membuat tutorial tentang bagaimana membuat kondisi seakan kita sedang berjalan di dalam hutan seperti di dalam permainan pertempuran.
Terima kasih
Thanks ❤