0 votes

Hello all, I'm creating a monster spawner and I want to know how can I detect the position of the previously monster spawned, just for not spawn another monster near or above it?

in Engine by (171 points)

most base nodes have a position variable, so you should be able to reference it in whatever script you need to.

I'm not sure exactly what effect you are trying to reach, could you explain it further?

1 Answer

0 votes

Without more details (and maybe some relevant code) it's hard to offer much specific advice. However, if you really just want to know the position of the previously spawned monster, why not simply store the position as you spawn a monster and then use it as reference when you spawn the next monster?

by (10,894 points)
edited by
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 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 webmaster@godotengine.org with your username.