#What am I doing wrong with this turn function?

34 messages · Page 1 of 1 (latest)

light cosmos
#

I'm following a tutorial on making a Feeding Frenzy clone, but the instructions on making the turn function don't seem to be working. I keep getting this error when trying to run a game and I don't know why.

potent helm
light cosmos
potent helm
light cosmos
potent helm
light cosmos
#

Main fish node? I don't have a node named that.

potent helm
light cosmos
#

I'm still confused on what you're asking here.

#

I have a fish scrpt, a EnemyFish script, and FishSpawner script, and a PlayerMovment script.

potent helm
#

What's the fish script attached to?

light cosmos
potent helm
light cosmos
#

Sorry for the late response btw. I got pulled away from my computer.

potent helm
light cosmos
potent helm
#

What's the fish scene you got up there? You sure your fish script isn't attached to that?

light cosmos
#

The tutorial specifically said not to attatch it to any specific scene. To have it in a script folder for global scenes.

potent helm
potent helm
# light cosmos Like this?

Yeah, like that.
Okay, so I don't know what's up with the tutorial, but your fish script is attached to your fish node. See in the inspector where it says sprite -> Assign? Click Assign, and then select the Sprite2D

#

Remember that @export var sprite: Sprite2D you wrote in the script? That's the variable that needed to be assigned.

potent helm
light cosmos
# potent helm In the inspector to the right. Rewatch the portion of the tutorial on @export va...

I think timestamping where that export var got set up in the tutorial. They weren't very clear here for some reason. https://youtu.be/C8BRd_eDMIA?t=1923

Just a silly little starterproject I made thats similar in style to games like Fishy, Feeding Frenzy or even agar.io. Hopefully you can watch and learn something here, or otherwise use the project to make something new, its available for you to download and use however you wish! Links further down

Please forgive the repetetive background music ...

▶ Play video
#

I'm seeing anything about the inspector here or what weas changed on it if at all.

light cosmos
#

Oh. I saw the assign part. I applied it to both the Player and enemy fish scenes. They're rotating perfectly now.

#

(Though now the numbers on the enemy fish stopped appearing for some reason.)

#

Well now I have a new problem.

light cosmos
#

Do I make a new topic for that or no?