This has really got my creative juices flowing (I think thats what the puddle is anyway
). Heres a slightly more advanced version of the script. The infection starts off quite benign, but lapses into a fatal state after a random amount of time. The chance of infection is also more random, and is based on the closeness of the nearest infectious unit. Still lots of possible improvements, and this is all totally untested, but I think this is a good starting point.
;set up these arrays in the init file
;infected = [man_1, man_2]
;deathstage = []
;immune = []
;-------------------------------------- Define Variables -----------------------------------
_unit = _this select 0
~(random 10)
;----------------------------------------- Main Loop ---------------------------------------
#loop
? count infected == 0 : exit
~10
? _unit in infected : goto "infected"
? _unit in immune : goto "loop"
? "_unit distance _x < 25" count infected > 0 : goto "infection"
goto "loop"
;------------------------------------- Check Infected Units --------------------------------
#infected
? _unit in deathstage : _unit setdammage (getdammage _unit + (random 0.05)); goto "loop"
? random 100 < 1 : deathstage = deathstage + [_unit]
goto "loop"
;--------------------------------- Check Whether to Infect Unit ----------------------------
#infection
_dist = 25
_i = (count infected) - 1
#nearest
_unclean = infected select _i
? _unit distance _unclean < _dist : _dist = _unit distance _unclean
_i = _i - 1
? _i >= 0 : goto "nearest"
? random 25 > _dist : infected = infected + [_unit]
goto "loop"
I'll pitch my idea for a small campaign here as well:
The government has been experimenting with new 'improved' plague as a biological weapon. Unfortunately things go wrong and some scientists and guards are infected. Instead of offering help the government confines the area and sends in observers (and guards) to monitor the effects - the outbreak becomes one big experiment. The stage is set for an island wide fight between those trying to get hold of an antidote, and those trying to stop them. There is great possibility for a fork in the campaign, with the player starting off as one of those sent to guard the observers, but with the possibility of being forced to join the other side if they become infected.
Any opinions ?