• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
switch(RandomInt(9)) Help
#1
instead of random 0 - 9 how do i make it like switch 1 2 3 4 5 6 to 9 then 0 back
[-] The following 1 user says Thank You to bastard016017 for this post:
  • Bloopbloop
  Reply
#2
Code:
level.superSwitch = 0;

function doMagic() {
  switch(level.superSwitch) {
    case 0:
    case 1:
    ...
    case 9:
  }
  level.superSwitch++;
}
[-] The following 1 user says Thank You to SuperNovaAO for this post:
  • bastard016017
  Reply
#3
(03-27-2011, 15:45)SuperNovaAO Wrote:
Code:
level.superSwitch = 0;

function doMagic() {
  switch(level.superSwitch) {
    case 0:
    case 1:
    ...
    case 9:
  }
  level.superSwitch++;
  if(level.superSwitch==10)
          level.superSwitch=0;
}

Fixed Wink
[Image: azuw.jpg]
[-] The following 1 user says Thank You to zxz0O0 for this post:
  • bastard016017
  Reply
#4
Yeah, forgot.
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Shocked [Request] Switch plugin axel-le-meilleur 6 1,631 10-19-2013, 06:59
Last Post: iRoNinja
  Help How to disable auto-weapon switch when out of ammo? Demyxxx 2 1,329 09-16-2011, 15:28
Last Post: Nekochan
  Choose Class button disappearing after side switch (intermission) thre3pi 2 819 08-05-2011, 02:13
Last Post: thre3pi
  [Tutorial] Give a weapon properly and switch to it Yamato 5 1,526 07-27-2011, 14:35
Last Post: Yamato
Brick Switch To Next Weapon Scripts18 2 699 07-19-2011, 19:26
Last Post: Scripts18
Information [Tutorial] Intermediate RandomInt switch/Thread's rotceh_dnih 3 1,512 04-03-2011, 10:05
Last Post: surtek
  [Request] random man switch team with timer wezljkz 6 997 02-18-2011, 07:04
Last Post: No One

Forum Jump:


Users browsing this thread: 1 Guest(s)