How to shorten this code?

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

How to shorten this code?:

$Sprite.position.x = 2
$Sprite.position.y = -3 

I tried this, but it didn’t work:

$Sprite.position = (2,-3)
:bust_in_silhouette: Reply From: Wurzelpilz
$Sprite.position = Vector2(2,-3)

Your code does not know what to do with your (2,-3)
Codes are like toddlers, stupid, you have to tell them everything, in this case, you have to tell it’s a Vector2 and not something else.

I just forgot to add Vector2, thanks!

Krasapan | 2021-08-06 13:34