0 votes

i just came across a video tutorial in youtube.I coded like in the video but i am getting many errors like Invalid get index 'view_size' (on base: 'Node (utils.gd)'). and Parser Error: Can't get index 'width' on base 'Vector2'.
Is it because in the video he is using a older version of godot or am I the only one getting this error ?

Here is the link Video Tutorial

in Engine by (55 points)

I figured it out instead of using get_viewport().get_visible_rect().size.width you should use get_viewport().get_visible_rect().size.x.

But another problem is that sometimes two or three enemies come one behind the another without changing their position even after using randomize(). How to solve it ?

Could you show the part of the code you using for this?

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.