Quote:
Originally posted by LilNiglet
What is it useful for?
|
In certain for loops, E.G.
NPC Code:
if (created||timeout) {
for (this.i=0;this.i<3;this.i++) if (keydown(this.i)){
this.selected=(this.selected+vecx(this.i))%weapons count;
}
timeout=0.05;
}
Would mean that even if you are selecting your last weapon it'd reset back to the first one if you push right while on that weapon.
I also used it for the online time system Munkee requested.