Hello! Im new to godot and GDScript and im currently expiriencing an issue with getting my veriable "gravity_pull". All the veriables are pulled from a diffrent script that i think is properly linked since every other pulled veriable is working.
here is the code of the movement:
extends game_meneger
var velocity: = Vector2()
func _ready():
pass
func _process(delta):
velocity.y += gravity_pull * delta
if Input.is_action_pressed("move_right"):
velocity.x = acceleration * speed
elif Input.is_action_pressed("move_left"):
velocity.x = -acceleration * speed
else:
velocity.x = 0
if is_on_floor():
if Input.is_action_pressed("jump"):
velocity.y = -jump_strength
velocity = move_and_slide(velocity, UP)
and here is the code of the GameMenager
extends KinematicBody2D
class_name game_meneger
#Gravity
var UP: = Vector2(0, -1)
export var gravity_pull: = float(30)
export var jump_strength: = float(300.0)
#movement behaviour
export var speed: = float(40)
export var max_speed: = float(80)
export var acceleration: = float(2)
The error that it gave me is "The identifier "gravity_pull" isn't declared in the current scope." on this line
velocity.y += gravity_pull * delta