Home   Help Search Login Register  

Author Topic: Gas Attack  (Read 1425 times)

0 Members and 1 Guest are viewing this topic.

Offline DOA

  • Members
  • *
  • ArmA 2 Rules - Nothing else comes close!
    • The Graveyard Shift
Gas Attack
« on: 20 Nov 2004, 18:59:08 »
Anyone know of any scripts to simulate a poison gas attack? Thanks...DOA
ArmA 2 - Nothing else comes close!
--
DOA

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Gas Attack
« Reply #1 on: 20 Nov 2004, 19:16:50 »
you could make green smoke shells and slowly lowers peoples health
using: (GL = game logic)
"smokeshellgreen" camcreate getpos GL1
repeat this for as many smokeshells as you want, just in different places(other GLs)
and you could activate it with a trigger and use thislist to determine who is losing health
and just put them on a setdammage loop that slowly brings their health down until they have left the area or die. you could also have randomized passing out or something like that, using an anim to make them fall to the ground.
actually, this sounds like a cool script

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:Gas Attack
« Reply #2 on: 20 Nov 2004, 19:21:28 »
hello
the starship troopers mod has a nerve gas bomb.
It dosent do any dammage but shoots off a lot of green gas

in order to make it kill people
place a game logic where the bomb is.
you could make a script that gets an array of anybody inside a certain radius of where the game logic is, and setdamage 1 them. I cant help you there though, I just know how to make scripts, I dont know how to actually write them out.
It shouldnt be to hard to do though ;D

EDIT
I did not post the same thing as trigg.
we were just typing out our awnsers at the exact same time and he finished before me.
You should probably combine our ideas
use his setdamgage thing and the nerve gas bomb.
« Last Edit: 20 Nov 2004, 19:24:48 by penguinman »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Gas Attack
« Reply #3 on: 20 Nov 2004, 19:31:00 »
Artak has one.    I don't think its released yet, but ask him.   It's brilliant.
Plenty of reviewed ArmA missions for you to play

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Gas Attack
« Reply #4 on: 21 Nov 2004, 01:33:31 »
Well, to create the array of whos within killing radius of the bomb, just create a trigger and countType "Land" all of the units in the trigger. Then just create a script that slowly kills them.

it isn't hard if you can't wait for Artak's.  :P
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Gas Attack
« Reply #5 on: 21 Nov 2004, 10:08:22 »
Uh..  :o

Nah, that's just one I made for laughs. I'm never really going to release it, because it belongs to my 'afterburner in a motorcycle script' -category :P

I can give you the scripts here and now though..

poisonplane.sqs
four gamelogics named as below
one airplane named as plane1
one trigger with 80x80 radius activated by anybody present and repeatedly named as killzone. condition: this   on activation: {[_x] exec "poison.sqs"} forEach thislist
Code: [Select]
_gls = [plane1gl1,plane1gl2,plane1gl3,plane1gl4]
_counter = -1
_move = plane1gl1

#reset
_counter = _counter +1
?_counter == 4: _counter = 0
_move = _gls select _counter

#pre1
plane1 flyinheight 70
plane1 move getpos _move

#loop1
~2
   ?!alive plane1: killzone setpos [0,0,0]; exit
   ?plane1 distance player < 500: goto "pre2"
   ?plane1 distance _move < 200: goto "reset"
   goto "loop1"

#pre2
plane1 flyinheight 30

#loop2
   ?!alive plane1: killzone setpos [0,0,0]; exit
   ?plane1 distance player > 500: goto "reset"

?plane1 distance player < 150: [plane1,[0,0,0],5,"green"] exec "smokescreen.sqs"
plane1 move getpos player
killzone setpos [getpos plane1 select 0, getpos plane1 select 1, 0]
~0.5
   goto "loop2"

#wait
~5
plane1 move getpos _move
~5
goto "pre1"

smokescreen.sqs
original version by MI_Fred
Code: [Select]
_obj = _this select 0
_ocoords = _this select 1
_ox = _ocoords select 0
_oy = _ocoords select 1
_oz = _ocoords select 2
_lt = _this select 2

_color = _this select 3
_r = 0
_g = 0
_b = 0
? _color == "red" : _r = 1; _g = 0; _b = 0
? _color == "green" : _r = 0.6; _g = 1; _b = 0.3
? _color == "blue" : _r = 0; _g = 0; _b = 1
? _color == "yellow" : _r = 1; _g = 1; _b = 0
? _color == "purple" : _r = 1; _g = 0.5; _b = 1
? _color == "white" : _r = 1; _g = 1; _b = 1
? _color == "black" : _r = 0; _g = 0; _b = 0
? _color == "grey" : _r = 0.5; _g = 0.5; _b = 0.5

_nrb = false
_rb = 0.9

_lts = (0.8 * _lt)
_ltm = (0.6 * _lt)
_lte = (0.4 * _lt)

_delay = 0.05
_erad = 30
_vx = 0
_vy = 0
_vz = 0

#track

? (_lt < _lts) : _vx = 0 - (random 1.5) + (random 1.5*2); _vy = 0 - (random 1.5) + (random 1.5*2); _vz = (random 1)
? (_lt < _ltm) && (_erad > 0): _erad = _erad - _delay
? (_lt < _lte) : _delay = _delay + 0.01

drop ["cl_water", "", "Billboard", 150, 10, [_ox,_oy,_oz], [_vx,_vy,_vz], 1, 1.62, 1, _rb, [0.1,8,20,40,_erad], [[_r,_g,_b,0.8], [_r,_g,_b,0.4], [_r,_g,_b,0.1], [_r,_g,_b,0]], [0,1,0,1,0,1], 0.1, 0.5, "", "", _obj]

? (_rb < 0.1) : _nrb = false
? (_rb > 0.9) : _nrb = true
? (_lt < _lts) && (_lt > _lte)  && (! _nrb) : _rb = _rb + 0.01
? (_lt < _lts) && (_lt > _lte)  && (_nrb) : _rb = _rb - 0.01

_lt = _lt - _delay
~_delay
? _lt > 0 : goto "track"

exit


poison.sqs
six oggs with coughing sound named as below
Code: [Select]
_Unit = _this select 0
?_Unit in poisonunits: exit
?!local _Unit: exit
?!canstand _Unit: exit

poisonunits = poisonunits + [_Unit]
?(local _unit) && (_unit == player): hint "You feel trouble breathing and taste blood in your mouth. This is it. Poison!!"
_screams = ["cough1","cough2","cough3","cough4","cough5","cough6"]

#slowkill
~random(5)+7

_Unit setdammage ((getdammage _Unit)+0.03)
~1
?!canstand _Unit: poisonunits = poisonunits - [_Unit]; exit
?!(alive _Unit): poisonunits = poisonunits - [_Unit]; exit
_rand = random (count _screams)
_Unit say (_screams select (_rand - (_rand mod 1)))

goto "slowkill"


Don't ask for help if you can't make it work  :)

[img removed]vastapallo.jpg[/img]
« Last Edit: 21 Nov 2004, 10:09:20 by Artak »
Not all is lost.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Gas Attack
« Reply #6 on: 21 Nov 2004, 17:25:30 »
what is going on here? I'm confused now, this started out with a gas attak, and then went to bombs, and now it has planes dropping green smoke out of them....  I don't know what he is asking anymore  ???

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Gas Attack
« Reply #7 on: 21 Nov 2004, 18:52:33 »
He was after any scripts that simulated a poison gas attack........he didn't specify any particular method of delivery.

Aircraft......hot air balloon.....it doesn't matter.


Planck
I know a little about a lot, and a lot about a little.