The creeps don't move in the Dodge the Creeps game

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


I have followed the tutorial of making the first 2D game and everything works as expected but the creeps are stuck in their place. This is the end of Main scene:

I didn’t find any similar questions, can anyone help with that?

And here are the codes:

extends Node
export(PackedScene) var mob_scene
var score

func _ready():

func game_over():

func new_game():
	score = 0

func _on_MobTimer_timeout():
	var mob = mob_scene.instance()

	# Choose a random location on Path2D.
	var mob_spawn_location = get_node("MobPath/MobSpawnLocation")
	mob_spawn_location.offset = randi()

	# Set the mob's direction perpendicular to the path direction.
	var direction = mob_spawn_location.rotation + PI / 2

	# Set the mob's position to a random location.
	mob.position = mob_spawn_location.position

	# Add some randomness to the direction.
	direction += rand_range(-PI / 4, PI / 4)
	mob.rotation = direction

	# Choose the velocity for the mob.
	var velocity = Vector2(rand_range(150.0, 250.0), 0.0)
	mob.linear_velocity = velocity.rotated(direction)

	# Spawn the mob by adding it to the Main scene.

func _on_ScoreTimer_timeout():
	score += 1

func _on_StartTimer_timeout():

	extends RigidBody2D

func _ready():
	$AnimatedSprite.playing = true
	var mob_types = $AnimatedSprite.frames.get_animation_names()
	$AnimatedSprite.animation = mob_types[randi() % mob_types.size()]

func _on_VisibilityNotifier2D_screen_exited():
:bust_in_silhouette: Reply From: EL0FBRENO

The creeps aren’t moving cuz they don’t have moving code.

( and I don’t know how to make they move too, sorry )

Thank you, can you please clarify?
I don’t see that in either HuD section or Finish Up section.

aminalaee | 2022-11-24 13:03