Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | harbor | |
Old Version | Published before Godot 3 was released. |
Hey all,
To familiarize myself with Godot, and to hopefully pick up some basic GDScript knowledge, I’ve recently started to make my own Pong game, guided by a nice YouTube tutorial. It’s very fun so far, but I’ve hit my first roadblock.
First off, here is my entire script so far –
extends Node
var player
var opponent
var ball
func _ready():
player = get_node("Player")
opponent = get_node("Opponent")
ball = get_node("Ball")
set_fixed_process(true)
func _fixed_process(delta):
player.set_pos(Vector2(player.get_pos().x , get_local_mouse_pos().y))
Here is where I’m stuck – I’ve been thrown this error message:
Invalid call. Nonexistent function 'get_local_mouse_pos' in base 'GDNativeClass'.
I’m confused by this. In the tutorial (here) it works perfectly for him, and it is not an old video – published in late January of this year.
So, if anyone would be kind enough to help me out… where have I gone wrong?