I'm not quite sure what you mean. Are the globals the %chance of the GMST? :unsure: What are random calls? Is the local script the one I would be creating?
Just as a sort of proof-of-concept sort of thing, could I recycle the Ascended Sleeper disease script and put in however many common disease I wanted?
The global I meant would be a global script. If a bunch of global scripts need a roll above 50 for something to happen, they would all happen at once if you use the global variable, random100. Random calls are every time random ( a function ) is used in a script. The script you are making would be attached to the creatures, just like the ones that already are, so yes, it is a local script. A local script has to be attached to something, otherwise it is global. The GMST doesn't affect anything but chance to catch a disease.
You could reuse the script if you aren't given every disease at once. I thought that you do get them all at once. Otherwise all you would need to do is replace the diseases with whatever you want and we wouldn't be in this mess. I'll check though, just to be sure. If that is the case, I think I know how to make it work the way you want.
But if ManaUser's test is correct, then you should be able to go on your merry way as far as I can tell.
Edit: You can certainly get more than one disease at a time. It is probably only especially noticeable with the percentage turned up, but it is possible. Like ManaUser however, I did notice that the chance is rolled separately for each disease.
So you could leave it like it is, but if the disease chance is made higher ( I tested at 25 and 100 ) it could be very dangerous for the player. If you are fine with that, then by all means go ahead. If you want to do it the the way you were before, I'll be glad to help if you need it.
Edit 2: Well, I went ahead and wrote the script anyway because I was curious. Tested and working, if you are interested.
Begin diseaseAscendedDontSaveObjectshort diseaseshort infectedfloat timer;ascended sleeper has all the blight diseases for some reason...;if ( CellChanged == 0 ); return;endif; CellChanged needs to be removed entirely, or the rest of the script won't run. It's not even needed anymore; anyway, so the whole block can be deleted.set disease to random, 100set timer to ( timer + GetSecondsPassed )if ( timer >= 5 ) RemoveSpell "ash woe blight" RemoveSpell "black-heart blight" RemoveSpell "chanthrax blight" RemoveSpell "ash-chancre" set infected to 0 set timer to 0else returnendif ; The timer is entirely optional and adjustable. In this case it is five seconds, so the disease will be changed; every five seconds. It exists to allow the given disease a chance to infect someone, and to a lesser extent; to keep them from getting too many infections too quickly. Without it, the disease will be recaculated every; frame. You will still get a disease either way, though this will also allow the script to be slightly better on; performance. Similarly, removing the spells is optional. Without doing so though, and especially without the; timer, if the actor were to cure themselves and the script gave another disease, they could potentially get all; of the added diseases as they could all be added in as little as four frames without the timer, and still pretty; quickly with it.if ( infected != 0 ) returnendifif ( disease <= 24 ) AddSpell "ash woe blight" set infected to 1elseif ( disease <= 49 ) AddSpell "black-heart blight" set infected to 2elseif ( disease <= 74 ) AddSpell "chanthrax blight" set infected to 3elseif ( disease <= 100 ) AddSpell "ash-chancre" set infected to 4endif;infected could be set to 1 each time here, but doing it this way allows you to check which disease was added.End
With this you should be able to see how you can adapt it to every diseased creature. You may want to modify the timer to your liking, and remove the comments if you wish. If you have any further questions or need something modified let me know.