Godot video tutorial error.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Yasin

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

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

Yasin | 2020-01-16 15:27

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 ?

Yasin | 2020-01-16 15:30

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

MrMrBlackDragon | 2020-01-23 01:14