This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Dear All,

First of all I am still new to programming and godot, so I hope someone is able to help me.
I am bussy with the dodge the creeps tutorial, it all worked fine (after a lot of trial and error). I have added a few functions to the game:
-Created a bullet
-Let the creeps "die"

these to functions worked oke (ofcourse with trial and error).
But i wanted to add a kill counter, after I tried some stuff (I dont remember exactly what i did…) I got the following error: "script inherits from native type 'area2d' so it cannot be instanced in object of type node"
I think it has something to do with me instancing de playerbullet2 in random nodes.. but i can not rember where it went wrong exactly.

It has been weeks now and i cannot get it back to play normally.
In the following link it is able to download my version of dodge the creeps:


in Engine by (29 points)

1 Answer

+2 votes

I didn't see your project but from the look of it seems like your script is extending Area2D which is not the type of your kill counter or in general, whatever node you're attaching the script to.

So change extends Area2D to extends Node (Node should work for most if not all cases) or the type of your kill counter node or any kind of nodes attached to the script.

by (4,246 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.