learn-gdscript icon indicating copy to clipboard operation
learn-gdscript copied to clipboard

Lesson 15 - 2D Vectors - Increasing scale using vectors

Open HamziBegh opened this issue 2 years ago • 0 comments

Issue description: In the Goals it says " Add a line of code to the level_up() function to increase the scale of the robot by Vector2(0.2, 0.2) every time it levels up"

In the Checks list it says "Correct scale after 2 levels"

So, one would assume the following:

func level_up():
	level += 1
	max_health *= 1.1
	scale += Vector2(0.2, 0.2)
	
	if level >= 2 :
		scale += Vector2(<correction_value>, <correction_value>)

But I was surprised that the suggested solution was:

func level_up():
	level += 1
	max_health *= 1.1
	scale += Vector2(0.2, 0.2)

This is just increasing health as levels go up, it does not do any corrections...

HamziBegh avatar Oct 17 '23 19:10 HamziBegh