Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Query about the Tutorials

Author
Message
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 21st Feb 2003 14:24
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:


And this is the New Code:


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.
QuothTheRaven
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 21st Feb 2003 21:50
you're probably the first one to go thru that tutorial step by step. Congratulations on finding that error
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 21st Feb 2003 23:41
Uhh, isn't that the purpose of tutorials? To go through every bit of the code and understand exactly what's happening. lol.

"Computers are useless they can only give you answers."

Login to post a reply

Server time is: 2024-11-24 03:45:00
Your offset time is: 2024-11-24 03:45:00