In the Final Project of game dev 3 the game gives me an error if I try to move
my code :
Spawn a hero with spawnHeroXY()
hero = game.spawnHeroXY(40, 34)
hero.maxHealth = 1
hero.attackDamage = 0
Add at least one goal!
goal = game.addManualGoal(“Vroum Vroum”)
game.addSurviveGoal()
heroSpeed = 6
#en def pour pouvoir faire d’autre partie
def start(heroSpeed) :
hero.pos.x = 28
hero.pos.y = 35
hero.maxSpeed = heroSpeed
#cercle du millieu
game.spawnXY(“fire-trap”, 38, 39)
game.spawnXY(“fire-trap”, 36, 38)
game.spawnXY(“fire-trap”, 34, 37)
game.spawnXY(“fire-trap”, 32, 35)
game.spawnXY(“fire-trap”, 34, 33)
game.spawnXY(“fire-trap”, 36, 32)
game.spawnXY(“fire-trap”, 38, 31)
game.spawnXY(“fire-trap”, 40, 29)
game.spawnXY(“fire-trap”, 42, 31)
game.spawnXY(“fire-trap”, 44, 32)
game.spawnXY(“fire-trap”, 46, 33)
game.spawnXY(“fire-trap”, 48, 35)
game.spawnXY(“fire-trap”, 46, 37)
game.spawnXY(“fire-trap”, 44, 38)
game.spawnXY(“fire-trap”, 42, 39)
game.spawnXY(“fire-trap”, 40, 41)
#cercle exterieur
game.spawnXY(“forest”, 4, 5)
start()