Jump to content
Sign in to follow this  
patronorion

Map Script Help

Recommended Posts

Hello guys! I am new here but have been playing Arma II for awhile. I have recently started to play with the editor and was wondering how to make zones where someone would get hurt over time, like radiation exposure.

The reason I am asking this is because I want to make a sort of coop role play map where you rescue civilians in an area that was hit with a dirty bomb.

So, back to what I want to know; I want to know how (if possible) to make zones that give the player radiation. The longer they are in it, the bigger the dose. And it doesn't go away until to go to a "decontamination" tent, which heals you and removes the radiation from your body.

Any help would be appreciated.

PatronOrion

Share this post


Link to post
Share on other sites

publicVaribles, loops and setDamages. :)

You could use triggers as well or even something like a distance from point thing.

Share this post


Link to post
Share on other sites

in addition to what kylania said, you could also implement sethit on head, hand and legs etc to simulate severe radiation.

simple example:

place a trigger covering the radiated area.

make it side present and repeated.

place this in on act of trigger, _dam is amount of damage caused for every unit of that side when inside the trigger every second.

when unit reaches damage level of 1, its dead. below 0.005 is used wich equals to ca 200 seconds (1/0.005 == 200). adjust how you like it

_null = thisTrigger spawn {
_dam = 0.005;
while {(count (list _this)) != 0} do {
	{
		_cDam = getDammage _x;
		_x setDammage (_cDam + _dam);
	} foreach (list _this);
	sleep 1;
};
};

and you can just erect a mash to heal at or get a medic to heal or script your own "remove contamination" script wich sets the dammage of units back to 0 or something.

Share this post


Link to post
Share on other sites

Demonized, by side present, do you mean detected by BLUFOR? And how would I script my own "remove contamination" script?

PatronOrion

Share this post


Link to post
Share on other sites
Demonized, by side present, do you mean detected by BLUFOR? And how would I script my own "remove contamination" script?

PatronOrion

i meant using the bluefor present not the detected by, but i asume it would work both ways.

but do you really want something to cause radiation only when spotted??

"remove contamination" is basically just healing, you can do it in loops, like in my previous post, but instead of adding to the setDammage values you remove:

simple example instant heal, place trigger over the area wich should remove contamination:

bluefor present:

in on act:

{_x setDammage 0} foreach thisList;

ofc this will heal any damage to unit not only what is dealt "as radiation" and it doesnt differ between vehicles or men, you can workaround that by setting a variable to a unit and then gather the radiation damage into the variable, and then heal only that amount of damage at the "remove contamination" area.

also use the isKindOf command to check for man units.

setVariable and getVariable is what you need for that.

Edited by Demonized

Share this post


Link to post
Share on other sites

BLUFOR PRESENT as the trigger settings is what he means by "side present".

To remove the contamination would be as something easy as

unit setDamage 0;

but with the trigger method the damage will stop when you leave the trigger. Even a MASH tent would be enough. A remove contamination script would be best for a method like I'd hinted at where you set a variable and as long as that variable is set the player gets effects/damage.

Edited by kylania
ninja'd

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  

×