I remember when I started out in 2002. We didn't have internet back then so I had to learn using the help files. But I was determined to learn how to use the language.
After two or three years I finally got to the stage where I could hold my own. In other words I didn't need anyone to help me put code together.
These days I see a problem as something fun, rather than a stop in the progress. If I cannot solve the problem however, I get frustrated and post a topic here.
Anyway, I can give a tip that I used to think about while learning, and am still using: Think about what is required to do in order to accomplish the goal.
For example if you want a character to jump, think of all the possible ways of doing this and select the easiest, or the best method you could think of.
method 1) when the player must jump, do a sin calculation on the y axis and reposition the player on this new position.
method 2) implement gravity, position the player at currentYposition+jumpHeight once the jump button is pressed (there should be a limiter to prevent the user to hold the jump button, as this will move the player upwards until the button is released), and let the gravity drag him down to the ground again
method 3) using method 1 and 2 combined to add smooth upwards velocity and then let gravity pull him back down.
Now define the method you selected, using a pseudo code.
method 3)
if jumpkey =1 and jumplatch =0
jumplatch =1
playerjump =1
oldypos = ypos
endif
if jumpkey =0 and playerjump =0 then jumplatch =0
if playerjump =1
ypos = increment by 20
if ypos = oldypos + 20 then playerjump =0
endif
ypos = ypos - gravity
position player x, ypos, z
Finally, using the pseudo code, you write the real db code.
if spacekey() =1 and jumplatch =0
jumplatch =1
playerjump =1
oldypos = ypos
endif
if spacekey() =0 and playerjump =0 then jumplatch =0
if playerjump =1
ypos = wrapvalue( ypos, oldypos+20, 80.0 )
if ypos = oldypos + 18 then playerjump =0
endif
ypos = ypos - gravity
position player x, ypos, z
thinking like that made me look for commands that do what I want instead of searching for tutorials and try to copy the code, which I found was harder to learn from.