Quote:
|
Originally Posted by napo_p2p
But this.active = 1 - this.active; is, like, more sekc.
BUT this.active = !this.active; is the sekciest of them all! <3 GS2.
|
But modulus allows you to have more than 2 switch modes.
i.e.
NPC Code:
this.switch = (this.active + 1) % 3; // <-- 3 switches!
this.switch = (this.active + 1) % 4; // <-- or 4!
Quote:
|
Originally Posted by Projectshifter
Wow, maybe I am getting old :O I'm going to stop getting on my computer for the first 10 minutes after I wake up. Somehow the use of % totally slipped my mind. Good call though. I'm going to spend this week brushing up on gscript again.
|
You better! :O It's about time we started on N-Pulse: Improved!