Enemy not wandering

Godot Version

Godot 4.3

Question

Working in Godot for the first time, trying to make my enemy wander. I don’t know why but my enemy is not wandering BUT I have no errors.

this is my wander script

class_name EnemyStateWander extends EnemyState

@export var anim_name : String = “Walk”
@export var wander_speed : float = 20.0

@export_category (“AI”)
@export var state_animation_duration : float = 0.5
@export var states_cycles_min : int = 1
@export var states_cycles_max : int = 3
@export var next_state : EnemyState

var _timer : float = 0.0
var _direction : Vector2

func init() → void:
pass

func enter() → void:
_timer = randi_range( states_cycles_min, states_cycles_max ) * state_animation_duration
var rand = randi_range( 0, 3 )
_direction = enemy.DIR_4[ rand ]
enemy.velocity = _direction * wander_speed
enemy.set_direction( _direction )
enemy.update_animation( anim_name )
pass

func exit() ->void:
pass

func process ( _delta : float ) → EnemyState:
_timer -= _delta
if _timer < 0:
return next_state
return null

func physics ( _delta : float ) → EnemyState:
return null

Are you calling move_and_slide() somewhere else in the code?
Because the code seems fine otherwise.

Maybe check if the enemy does go into this state by printing something in enter().

yah I am, turns out I had the wrong script connected. thanks!!