#Tutorial problem

47 messages ยท Page 1 of 1 (latest)

keen crescent
#

I was following projectile tutorial form gdquest and this happened. Any fix?

amber bay
#

Line 36, you wrote projectile.instance() instead of projectile.instantiate()

keen crescent
#

Oh god this is embarrassing XP

#

Thx

keen crescent
#

@amber bay I am now facing this problem please halp

#

I checked the gdquest projectile resource file and I can't figure it out why packscene not working in my code

amber bay
#

what is the tutorial again?

#

oh

#

hum

#

did you make a variable to preload your scene?

#

something like this

keen crescent
#

Yes

#

Oh wait no

#

The video tutorial didn't have that

#

Learn to Code from Zero, With Godot: https://www.gdquest.com/


๐Ÿ“š THE LINKS

Open-source demo project: https://github.com/gdquest-demos/godot-demos-2022/tree/main/ranged-attack


๐Ÿ‘ฅ CREDITS

Video edited by Nesi: https://www.youtube.com/c/NesiAwesomeness

๐Ÿ’Œ JOIN US

Come chat on Discord: https://discord.gg/87NNb3Z
Follow us on Twitter: h...

โ–ถ Play video
amber bay
#

oh, it's an Godot 3.5 tutorial, I don't really know this version but from what I see, it preloads the scenes well, at the top of the scripts (the two const)

keen crescent
#

Yeah I'm using Godot 4 so

#

But funny thing is that when I open the demo project and I check their project file, is has no error

keen crescent
#

But will it work on const tho

amber bay
#

oh, try to change BulletScene by bullet

keen crescent
#

will do

keen crescent
amber bay
#

Change const by a variable

keen crescent
amber bay
#

I running out of ideas ๐Ÿ˜…

keen crescent
#

F

#

Thx for taking your time

wise bison
#

you're probably trying to get a scene, not a script

keen crescent
#

Jesus christ

#

I am emberrising myself further

wise bison
#

not at all, it happens to me all the time too, that's the only reason I noticed godette_smile

keen crescent
#

And now this TwT

wise bison
#

try to go into thee 120mm cannon scene (and script), it says it can't find "ShootingPoint". I suspect there is a mistake somewhere there

keen crescent
#

Ah nvm found it

wise bison
#

it says there is a problem in line 9 of that script (120_mm_cannon.gd), so either there is a problem with declaring that variable or there is some other problem

keen crescent
wise bison
#

regarding that variable or node

keen crescent
#

I understand now

wise bison
# keen crescent

also, just curious, but is there now a global "bullet" var and a local one within the shoot function? Cause you should generally avoid giving two different things the same name if they are within the same script

keen crescent
#

and I fixed it as the tutorial shown

#

like this

#

it works now so that's all that matter