
02-12-2009, 08:01 PM
|
|
Former UN Dev Admin
|
Join Date: Nov 2005
Posts: 42
|
|
|
just like written above as long as those variables are defined
You can see in Chompy's script where those variables (temp.startx, temp.angle, etc) are given values.
You can very well just put all the numbers/math in the appropriate location in the shoot() function, but it's very messy, and considered bad practice to use "magic numbers", meaning numbers without clear meaning.
Defining the variables beforehand gives the code more readability ^_^ |
|
|
|