stage=0
that sets the variable stage to 0.
IF LEFTKEY()=1 THEN a#=a#-8.0
if leftkey is pressed (true) then variable a# is decreased by 8. Variable a# is used as the value for the Angle. That is used in the movement (y-axis, I presume)
IF RIGHTKEY()=1 THEN a#=a#+8.0
This time it checks for rightkey, and instead of decreasing the a# variable, it increases it by 8.
a#=wrapvalue(a#)
Now, when the app starts, a# was most likely 0 by default. If the user pressed leftkey, it would have been decreased by 8. That means a# would be -8 at the moment. Now, if you want to use the a# as an angle, you can't have negative values or values over 360. Wrapvalue solves this. after passing a# through wrapvalue means that a# = 352
IF UPKEY()=1 THEN x#=NEWXVALUE(x#,a#,3)
If the player presses upkey, the new value for variable x# is calculated. x# is most likely a variable used in positioning an object in 2 or 3 dimensional space.
NEWXVALUE requires 3 variables to return anything usefull.
first is the current position. we use x# here which is the old/current position. a# is the angle we are facing. (y-axis)
and the last one is the distance or speed (depends on how you look at it) we move.
new zvalue does the same, but for z# position.
Thing with this, is that we are basically plotting a new position on 2d space (x & z dimensions). This means the even if it looks that we are moving both values by 3 or -3, it takes account the angle. if you are looking at left (usually x dimension), only the x will get added up while the z stays the same. Fortunately for you, those commands make this all a lot easier than by doing it all with maths.
And stage is some variable that is set on when you press upkey.
Normally the ":" sign is used to separate commands (so you can have more than one in the same line) but if you use it after IF, it will count in aswell.
that's about it.
Keyboard not detected. Press F1 to continue.