This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I was following a tutorial on the godot website and came across this error
This is the code so far:

extends Node

export(PackedScene) var mob_scene
var score

func ready():

func game_over():

func new_game():
score = 0

func onStartTimer_timeout():

func onScoreTimer_timeout():
score += 1

func onMobTimertimeout():
var mob
spawnlocation = getnode("MobPath/MobSpawnLocation");
mobspawnlocation.offset = randi()

var mob = mob_scene.instance()

var direction = mob_spawn_location.positon + PI / 2  #This is where the error 
mob.position = mob_spawn_location.position            #occurs.

direction += rand_range(-PI / 4, PI / 4)
mob.rotation = direction

var velocity = Vector2(rand_range(mob.min_speed, mob.max_speed), 0)
mob.linear_velocity = velocity.rotated(direction)
Godot version 3.2.3-stable
in Engine by (35 points)

1 Answer

0 votes

You wrote positon, not position.

by (22,191 points)

OMG Thanks i feel so stupid now ☺

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.