Godot error In course Vector2 & Apply_Impulse

When trying to run my program it opens the 2d scene for a second then closes then I get an error

Script inherits from native type ‘Rigidbody2D’, so it can’t be assigned to an object of type : ‘Node2D’

I also get a ‘level_1 TSCN:GD’ which is a new scene that should up after playing our code ???

i think that shows up when an in_built script is created and its not saved as a .gd file to the disk.

if this is a script attached to the Level_1 node. i would remove it from the file list highlighted, go back into level_1 and remove and recreate the script ensuring that, in the popup window that appears, the ‘built-in script’ box is not highlighted and try again.

it could end up with file conflicts down the line.

image

see how that goes.

Darren

So I have that Level.gd in my folder structure sorry still trying to learn the names of things

I am coming from starting to learn Unity and then I learned some unreal but want to evetually make a 2.5 space battle game

that sort of gear looking icon, still looks like there might be an in-built script attached to level_1 somewhere.

that list is a list of the open scripts you have, you can right click and close the ones you dont want to have open.

what you could do to try and find where it is, if its still there. have a look at the level_1 scene tree and when you open each script thats attached to a node, it will appear in that open scripts list. if you do find it, you can remove it from the node in the scene.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms