Thread Rating:
  • 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
Reply

#2
Code:
level.superSwitch = 0;

function doMagic() {
  switch(level.superSwitch) {
    case 0:
    case 1:
    ...
    case 9:
  }
  level.superSwitch++;
}
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]
Reply

#4
Yeah, forgot.
Reply



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

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.