
12-04-2005, 04:23 AM
|
|
dark overlord
|
 |
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
|
|
Quote:
|
Originally Posted by Polo
Either your post is unclear (to me), or you see an alternate interpretation of this statement. To me I only see one interpretation, and a quick check in the editor confirms this behaviour (ie: counting in half steps up to 10, then reseting). The multiplication with 'i' to give it its indexes leads to some nice patternal behaviour (1,3,6,10,15 etc..) on the first loop, and an alternate series of integers on the second loop through.
On the 3rd and 4th loops however, half the values have a .5 offset (and shouldn't be valid image indexes), is this what you are referring to Lance?
Asside:
Note that the above '.5' issue can be fixed by changing the case to <=, as this then ensures that the lengths of both 'counted loops' are multiples of eachother, and the value will (in this case), always be even.
|
Other than the noninteger image index problem,
NPC Code:
this.a = (this.a < 10) ? (this.a + 0.5) : this.a = 0;
Should be:
NPC Code:
this.a = (this.a < 10) ? (this.a + 0.5) : 0;
|
|
|
|