|
atraeyu Novice
Joined: 29 Dec 2006 Posts: 41 Location: Chester, VT
|
Posted: Fri Dec 14, 2007 11:02 pm
Adding Randomness |
I want cast light to execute only 10% of the time. I'm doing this by using the following:
#CASE %random {cast light} {#NOOP} {#NOOP} {#NOOP} {#NOOP} {#NOOP} {#NOOP} {#NOOP} {#NOOP} {#NOOP}
Is there a better way? |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Fri Dec 14, 2007 11:07 pm |
#if (%random(1,10)==10) {cast light}
|
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Fri Dec 14, 2007 11:08 pm |
Of course if you are going to cast 9 other spells as well then #switch is probably what you are looking for.
|
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
atraeyu Novice
Joined: 29 Dec 2006 Posts: 41 Location: Chester, VT
|
Posted: Fri Dec 14, 2007 11:14 pm |
Thank you :)
|
|
|
|
|
|