The 9th Tutorial (Explosions) under 'The Game' heading for the tutorials on the site has an unexplained code change when you click the mouse that well, doesn't seem right to me.
This was the code from the previous tutorial:
Rem Shoot bullet
if Mouseclick()=1 and BulletLife=0
Position object 2,X#,Y#+43,Z#
Set object to camera orientation 2
BulletLife=25
show object 2
Loop sound 2
Endif
And this is the New Code:
Rem Shoot bullet
if Mouseclick()=1 and Explode =0
if BulletLife=0
Position object 2,X#,Y#-7,Z#
Set object to camera orientation 2
BulletLife =120
show object 2
Loop sound 2
Endif
Endif
All of it makes sense to me except for the line that changes the position of the bullet.
Position object 2,X#,Y#+43,Z#
Was changed to:
Position object 2,X#,Y#-7,Z#
That makes no sense to me, in Tutorial 8 you moved it up 43 units so it's around where the gun is which makes perfect sense. But then in Tut 9 it says it's changed so it goes down 7. The strange thing about this is that if you move it down 7 then in most cases the bullet will start in the ground triggering the explosion autmoatically and thus you can't shoot unless aiming straight up.
If I change it back to +43, the game will run fine, so why exactly is it changed to -7? Was it just an accident or something?
Silly Rabbit, Tricks are for Kids.