Comments

Log in with itch.io to leave a comment.

Viewing most recent comments 1 to 6 of 135 · Next page · Last page
(1 edit)

Does not work well in mobile, does not fit to width of device. Even when changing text size still difficult to read. 

Thanks!

I have a programing question that isn't clarified by the app if its OK to ask here: 

In lesson 14 the practice where we make the robot take half damage, the if statement where we make the robot  take damage half damage if their level is above level 2 only works if that if statement is the first thing written in the take_damage function. Why does it only work in that order.


Example:

var level = 3

var health = 100

var max_health = 100

func take_damage(amount):

    health -= amount

    if health < 0:

        health = 0

    if level > 2:

        amount *= 0.5

^ This doesn't work.

========================

var level = 3

var health = 100

var max_health = 100

func take_damage(amount):

    if level > 2:

        amount *= 0.5

    health -= amount

    if health < 0:

        health = 0

^ This does work.

(1 edit) (+1)

I would assume (based on my experience with Python, which GDScript is similar to) that the first example does not work because the order of execution is different. In that example, when "take_damage(amount)" is called, "amount" is first subtracted from "health", then it checks if health is lower than 0, then it checks the level and changes the "amount" after the original "amount" has already been subtracted. I hope that makes sense.

(+1)

To clarify: Assuming it works like in Python, functions are generally processed from top to bottom.

this makes sense to me. it sounds like an order of operations problem. thanks for the response!

Always happy to help!

I checked the app to see when/if it mentions this, it looks like in lesson 4 it's kinda mentioned in passing but it's easy not to remember ten lessons later, haha.

This is so cool! Perfect for an absolute beginner to learn the basic fundamentals of programming. The lessons are well written and the pacing feels good. It's short and sweet with fun interactive portions

If you already know how to code I'd suggest skimming through the list of lessons first. If they all seem too easy, skip ahead to reading the docs and trying out a tutorial

If you get stuck check the hints, re-read the lesson, or look at previous questions in that lesson. If you're really confused there's even a solution button that shows you the answer

I knew a bit about python and it's language and gd is rlly simlar so I was suprised at how easy it was.. BUTT (hehe butt) can you guys please make it so people can make there own variables? Bc at the start I wanted to make my own lines of code that does the same thing but more simplified but couldn't bc of the restrictions of the syntax.

(+2)

tysm I started making games recently and I didn`t understand GDScript, super easy, clear, good cource, thanks

Viewing most recent comments 1 to 6 of 135 · Next page · Last page