Jump to content
Sign in to follow this  
ArmAriffic

Help with radiation please

Recommended Posts

I have searched but didn't find anything so does anyone know any scripts to simulate radiation (enter the area and start to get hurt or something like that)?

Share this post


Link to post
Share on other sites
I have searched but didn't find anything so does anyone know any scripts to simulate radiation (enter the area and start to get hurt or something like that)?

Your best bet would be to use a trigger to launch a script which slowly decreased the player's health.

Try putting this in the on activation field of a trigger set off by the player:

[] spawn {_health = damage player; while {alive player} do {_health = _health + 0.05; setdamage player; sleep 60}}

Once they've entered the radiation zone trigger they'll get progressively sicker and eventually die, even if they leave. I haven't set it up to be reversible though.

Share this post


Link to post
Share on other sites

that's what I wanted thanks, testing now

EDIT: Does not work, I get an error in the trigger and it does not work in a .sqf

Edited by ArmAriffic

Share this post


Link to post
Share on other sites

tpw's code is not quite correct:

setDamage expects an object and a value between 0 and 1, check the Biki

Try this instead:

Place a trigger in the editor and name it, e. g. radiation_trigger. Set the trigger to activation anybody present and repeatedly.

Then call the following script at mission start, e. g. in the init.sqf or from the initline of a game logic:

private ["__radiationArea","_units","_damage","_delay","_i"];

_radiationArea = _this select 0;
_damage = _this select 1;
_delay = _this select 2;

while { true } do {
_units = list _radiationArea;
for [{_i = 0},{_i < count _units},{_i = _i + 1}] do {
	if (alive (_units select _i)) then {
		(_units select _i) setDamage (getDammage (_units select _i) + _damage);
	};
};
sleep _delay;
};

The script needs three parameters:

1. name of the trigger which depicts the radiation area - in our example radiation_trigger

2. damage value each unit inside the trigger will receive

3. time interval in which damage from 2. will be added to each unit inside the trigger

Example call:

null = [radiation_trigger,0.1,10] execVM "radiation.sqf"

In this example every unit inside the trigger radiation_trigger will receive 0.1 damage every 10 seconds.

Share this post


Link to post
Share on other sites
that's what I wanted thanks, testing now

EDIT: Does not work, I get an error in the trigger and it does not work in a .sqf

Sorry mate, that's what you get when I give advice whilst not sat in front of my arma box.

//Radiation script
hint "Player has received a lethal dose of radation";
_health = damage player;
while {alive player} do
{_health = _health + 0.05;
player setdamage  _health;
sleep 60;
}

Save this as a script and in the on activation field of your trigger which you've synced to the player, put

nul = [this] execvm "radiation.sqf"

---------- Post added at 19:59 ---------- Previous post was at 19:58 ----------

Ooops just saw zwobot's more comprehensive solution.

Share this post


Link to post
Share on other sites

Fallout zones are supported in my older nuke design for ACE. An enhanced version is included in the version for Mando Missiles.

Share this post


Link to post
Share on other sites
Sorry mate, that's what you get when I give advice whilst not sat in front of my arma box.

//Radiation script
hint "Player has received a lethal dose of radation";
_health = damage player;
while {alive player} do
{_health = _health + 0.05;
player setdamage  _health;
sleep 60;
}

Save this as a script and in the on activation field of your trigger which you've synced to the player, put

nul = [this] execvm "radiation.sqf"

---------- Post added at 19:59 ---------- Previous post was at 19:58 ----------

Ooops just saw zwobot's more comprehensive solution.

Thanks

Share this post


Link to post
Share on other sites

Just wait, I'm finishing my radiation script with Geiger counter function including sounds for my project :) I'll up it when it's ready. Very apocalyptic experience when combined with zombies mod

Edited by RazorX

Share this post


Link to post
Share on other sites
Just wait, I'm finishing my radiation script with Geiger counter function including sounds for my project :) I'll up it when it's ready. Very apocalyptic experience when combined with zombies mod

Cool, i'll def download when ready

Share this post


Link to post
Share on other sites

setDamage damages all body parts, making your guy appear bloody, which should not be the case with radiation. Instead, use the unit setHit ["",damage unit+0.01] method that damages only the overall damage part of the unit.

Share this post


Link to post
Share on other sites

That's a really interesting bit of info celery.

Here's a script that damages you more as you get closer to the source of the radiation:

radiation.sqf

_unit = _this select 0;

_center = _this select 1;

_damagefactor = _this select 2;

_radius = _this select 3;

_time = _this select 4;

while (true) do

{

_distance = _unit distance _center;

if (_distance <= _radius) then

{

_unit setHit ["",damage unit+(_damagefactor * (1/_distance))];

};

};

When you want to activate the radiation zone, just put this into any trigger/init:

{nul = [_x, center, damagefactor, radius, time] execvm "radiation.sqf"} foreach allunits

where

center = the object around which the zone is centered

damagefactor = severity pf the radiation. putting in 1 here will mean that if you stand 1 meter from the radiation source, you will receive 10% damage every "time" seconds

radius = size of the zone in meters

time = time between each damage hit.

Let me know if it doesn't work there could be a problem with some brackets up there.

Edited by lozz08

Share this post


Link to post
Share on other sites
setDamage damages all body parts, making your guy appear bloody, which should not be the case with radiation. Instead, use the unit setHit ["",damage unit+0.01] method that damages only the overall damage part of the unit.

Recheck your sources, bleeding is quite common in severe radiation poisoning - as is fluid leakage from burns. Beta radiation does this quite readily.

Share this post


Link to post
Share on other sites
Recheck your sources, bleeding is quite common in severe radiation poisoning - as is fluid leakage from burns. Beta radiation does this quite readily.

Only after a prolonged period of poisoning. Heavy poisoning during a short time span (which is the case in this thread) hardly opens your skin, you just feel sick and then you die.

Share this post


Link to post
Share on other sites

A dose that can kill in less than an hour ( like most fallout models in ArmA are using ) represent very high exposure levels. In a mix of beta and gamma radiation at those levels ( > 6 Gray ) you would experience both burns and internal bleeding.

Share this post


Link to post
Share on other sites
A dose that can kill in less than an hour ( like most fallout models in ArmA are using ) represent very high exposure levels. In a mix of beta and gamma radiation at those levels ( > 6 Gray ) you would experience both burns and internal bleeding.

So would you say that a person exposed to radiation that kills within an hour will look like the mess with holes in the head, body and limbs that is a setDamaged unit in Arma 2?

Share this post


Link to post
Share on other sites

I'm saying that the damage and BI's representation of "a mess" are not totally incompatible.

Share this post


Link to post
Share on other sites

I doubt the mess version. Note that the effects of lethal doses of radiation are observed within up 6 weeks. Holy shit, it's a huge amount of time in agony. To kill a human within a period of minutes requires tremendous amount of gamma particles, such radiation never existed even in regions of Chernobyl. Most of you don't know about the accident in Chelyabinsk, read about it and you will know that Chernobyl was only a little disaster in comparison to that.

Bleedings what you mentioned takes place after at least 2 days after being irradiated, mainly from digestive system, rarely from skin - the skin must have been damaged earlier or take at least 1000R and still the deformations are observed at least after a week. The skin turns red after a couple of hours after being irradiated but this effect lasts only up to 24 hrs, after a week the skin stars to turn dark red and deformations start.

Gastric mucosa is being completely destroyed and the organism can't take any nourishment, there is a huge body mass loss. Radiation destroys the immune system, even light wounds are sources of infection. After a long period of time people often die of leukemia. After a month first signs of cancer can be observed.

In all this I mean that killing a human by radiation in a period of minutes is simply impossible. Computer games like Stalker or any other of this kind showing radiation killing in seconds are simply imaginary and have nothing to do with reality. During first months after the Chernobyl explosion only 31 people died of radiation sickness, most of them were the scientists which were inside the power plant and they didn't died instantly though.

Just stop watching too many sci-fi movies and take some books instead.

If you want to implement a realistic radiation, you have to use realistic lengths of time, sorry.

Share this post


Link to post
Share on other sites

...

Just stop watching too many sci-fi movies and take some books instead.

If you want to implement a realistic radiation, you have to use realistic lengths of time, sorry.

I'll forgive you for being ignorant of my background...

Comparing radiation from a graphite fire event like Chernobyl is nothing like the fallout a fission or boosted-fusion weapon generates. The isotopes coming from a reactor are much longer-lived, leading to lower intensity levels per gram of product. The fire resulted in very fine particles that spread widely, resulting in further reductions in intensity per square meter.

I did not wish to re-implement a version of DELFIC, but my versions of nuclear fallout do take dispersal and exposure times into account and do represent realistic dosage effects for the multiple isotopes I include in my radiation zones ( note plural ). I concider a soldier KIA when the combined dosage effects would cause them to be combat-ineffective. For the 6-7 Gray zones ( rad is an obsolete unit ), that means about 10 minutes before incapacitation due to nausea and CNS issues. The time to "lethal" exposure will vary in other zones and will grow longer as isotopes decay.

I also model prompt radiation at burst time, both neutron and gamma flux are included with proper attenuation for material and distance from burst. Near-instant lethal levels are quite common within several hundred meters of hypocenter of a 5 kiloton weapon, resulting in dead armor crews inside tanks that are minimally damaged.

Share this post


Link to post
Share on other sites
Originally Posted by RazorX View Post

...

Just stop watching too many sci-fi movies and take some books instead.

If you want to implement a realistic radiation, you have to use realistic lengths of time, sorry.

FPDR

one of these times that mis communication in forums leads to .. drama..

as stated quite a few times in the forums.. when it comes to nukes and all the math.. EE has been there and done that in real life.

shame that it gets carried away over and over in these forums...

:rolleyes:

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×