Godot Version
v4.3.stable.official
Question
I’m a newbite in Godot. for now I’m trying to create my very first complete game with instruction on godotengine.org. So, at the finish line of my first 2d game (at the end of this step: Главная сцена игры — Документация Godot Engine (4.x) на русском языке), I get an unexpected error: “script inherits from native ‘rigidbody2d’ type godot, so it can’t be assigned to an object of type ‘timer’”.
So, I spend two days to figure out, where the problem is. After two days, I realised that somehow I accidentally attach “Mob” script to the “MobTimer” node. So, to make everything work, I just need to unpin the script from MobTimer.
Reason of error: I have the mob_script, that starts from “extends RigidBody2D”, so I think, it can work only with this type of node. I accidentally attach this script to RigidBody2D, and somehow, for some reason, to the MobTimer. So, that’s why I get this error. Unpining script from MobTimer makes the game works.
I decided to create this topic for those, who will have the same problem in future. I hope, that’ll help, and save somebody a few tense minutes or hours.