Im getting an error saying that there is no exsiting function position in base Sprite
I trying to make my level select with a sprite to show what you are selecting by moving left to right acrross the stages.Using Godot 3.0
extends Node
var index=0
func _ready():
set_process_input(true)
func _input(event):
if event.is_action("ui_left") && event.is_pressed() && !event.is_echo():
if index!=0:
index-=1
var x=get_node("Select").position().x-200
var y=get_node("Select").position().y
get_node("Select").position(Vector2(x,y))
if event.is_action("ui_right") && event.is_pressed() && !event.is_echo():
if index!=4:
index+=1
var x=get_node("Select").position().x+200
var y=get_node("Select").position().y
get_node("Select").position(Vector2(x,y))
if event.is_action("confirm") && event.is_pressed() && !event.is_echo():
if index==0:
print("stage1")
if index==1:
print("stage2")
if index==2:
print("stage3")
if index==3:
print("stage4")
if index==4:
print("stage5")