+1 vote

Hi im new to godot and game dev i've been using godot for almost a month now and i've stubble on a problem which i can't wrap my head around, so i have player scene which i instantiated on the main scene and i made an enemy scene that i want to instantiate THROUGH the main scene's script without having to drag and drop it, and i want the enemy to access the player's property so i can make the enemy chase the player, how would i go about doing this? i've tried using singleton and autoload, i understand the concept but i couldn't implement it in code, thanks in advance!

PS. I'm using C#

in Engine by (13 points)

Please log in or register to answer this question.

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.