Home   Help Search Login Register  

Author Topic: GasBomb Particle and Damage effect(ACCEPTED)  (Read 9426 times)

0 Members and 1 Guest are viewing this topic.

Offline Odin

  • Members
  • *
GasBomb Particle and Damage effect(ACCEPTED)
« on: 26 Jul 2008, 04:46:36 »
G'day, This is my 1st serious attemt at an effect like this.

Basicaly, Once triggered a Bomb is created using a barrel to simulate the shell with my attempt at a missile trail attached, on impact it will expload causing minimal Damage to Static and Land typ classes (25 meter radius), after which the Gas effects kick in causing damage to Units in and out of vehicles both Randomly and within certain distance to object looped for 20 seconds.
While the loop is in action it checks the Damage for units within the Array, if a units damage corrisponds to the check's, a certain playmove or coughing sounds are initiated for that unit including player. If player is within 200 meters of the Object the player will experince white flashes every time they take new damage.
After the effect is finished the user is offered an optional Body Removal for all dead within the Array.

How to use this script is included in the scripts header as well a description file with the CfgSounds filled out for users to be able to cut & paste into thier own description as well the sounds folder.

There are labels throughout the script to let the user know what part they are looking at and what they can alter to suit there own needs.

The only thing I would like to add is the actual bomb coming in on an angle but 1st I need to learn some ARMA maths :weeping:

EDIT; I have Fixed the angle problem. I have made this version's effects last longer and be less harmful though still deadly to prolonged exposure. Headers throughout the script have been updated to let User know what parts they need to change to adjust damge levels and radius. Added this code
Code: [Select]
{(_x disableAI "AUTOTARGET")} forEach _array1;
{(_x disableAI "TARGET")} forEach _array1;
{(_x setSpeedMode "FULL")} forEach _array1;
{(_x domove [(getPos _x select 0) + random 400 ,(getPos _x select 1) + random 400 ,(getPos _x select 2)])} forEach _array1;
{(_x setBehaviour "CARELESS")} forEach _array1;
to make AI run away from the attack and disregard current orders and Waypoints.

I have included the Carbomb version of this script which works via a looped marker attached to the vehicle, it is set up in the example ready for use and needs to be activated via Radio Bravo for the example only.

I have also included a Mapclick version which has been set up in example, use via Radio Alpha.(Errors detected will fix    FIXED)

Edit: fixed a small Desription.exe error, thanx spooner

EDIT 04\09\08: Scripts now Multiplayer friendly. carbomb.sqs has been rewritten so now no marker is required for the effects to initiate from, only the vehicle itself, new usage of script include in script Header and the Readme.
Readme, Breifing and Overveiw added.

Usage of these scripts is written in the header of each script.

Original script is included aswell.

Example Mission attached



Enjoy
Odin


P.S. I would just like to say thx to Zonekiller, Mando, Gigan and Luke for their scripts which allowed me to study and create this and CSL for his great utility, Cheers


OFPEC Download
« Last Edit: 06 Feb 2009, 17:10:59 by hoz »

Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: GasBomb Particle and Damage effect
« Reply #1 on: 28 Jul 2008, 01:31:16 »
Odin,

Kudos to you  :good:!

Nice effects, nice particles!!
Little overpowered methinks, but hey, IDK  :dunno:

For the maths you mention, it's all kinematics,

try doing the following,

Code: [Select]
_height =(getposasl shell select 2) - (getposasl target select 2);
_timetoimpact=sqrt(_height/4.9);
?_timetoimpact < 0:goto "lookout!"
_xdistance= (_getpos shell select 0) - (_getpos target select 0);
_ydistance= (_getpos shell select 1) - (_getpos target select 1);
shell setvelocity[(_xdistance/_timetoimpact),(_ydistance/_timetoimpact),0];
exit

#lookout!
hint "TOO LOW!!"
What this does is gets the height of the shell relative to the target, where ever the shell is,
then it calculates the amount of time it will take for the shell to hit the height of the target
gets the ground distance between them, then sets the shell's velocity to get to come in at an angle.
This does not check for ground in the way, and the angle is defined by the distance & height

If you want to it to come in at a set direction/angle/height/distance, I'll have to go check the books,

Be right back!!

Luke

EDIT:

If you want it to come in exactly at a set angle that will take calculus, due to the fact of the angle of the tangent in parabolic arc.

In otherwords it's too complicated because
a). I haven't taken calculus yet.
b). I don't believe arma can handle such functions.

However if you want it to come in at roughly at a particular angle then you must pick a direction, then the distance/height (but not both distance & height, else you sacrifice angle) where _angle is the angle it comes in at, and then do the following:
Code: [Select]

#height_provided

_targetheight= getposasl target select 2
_shellheight =_targetheight + _height
_distance = (_height * sin (90 - _angle))/(sin (_angle))
shell setpos [_distance * cos(_direction),_distance * sin(_direction), _height];
_timetoimpact=sqrt(_height/4.9);
_xdistance= (_getpos shell select 0) - (_getpos target select 0);
_ydistance= (_getpos shell select 1) - (_getpos target select 1);
shell setvelocity[(_xdistance/_timetoimpact),(_ydistance/_timetoimpact),0];

exit
#Distance_provided

_height=(_distance * sin (_angle))/(sin (90 - _angle))
_targetheight= getposasl target select 2
_shellheight =_targetheight + _height
shell setpos [_distance * cos(_direction),_distance * sin(_direction), _height];
_timetoimpact=sqrt(_height/4.9);
_xdistance= (_getpos shell select 0) - (_getpos target select 0);
_ydistance= (_getpos shell select 1) - (_getpos target select 1);
shell setvelocity[(_xdistance/_timetoimpact),(_ydistance/_timetoimpact),0];

exit

Hope that helps!!
« Last Edit: 28 Jul 2008, 03:42:26 by Luke »
Pesky Human!!
Wort Wort Wort.

Offline Odin

  • Members
  • *
Re: GasBomb Particle and Damage effect
« Reply #2 on: 29 Jul 2008, 12:12:12 »
Hey thx for the Code bits mate :cool2: I had a tinker with em but got no angle of decent, but I will try on the weekend to get it sorted when I have a bit of spare time. (BTW you could'nt direct me to script where I can see how it works ty)

Thx for looking at this for me, I am glad it looks good to someone else too  :clap: but may I ask? when you say overpowered, do you mean the inital explosion, or the kill radius and time it takes to kill a unit? just intrested to know so I can make this better

Cheers
Odin

Offline CrazyAce

  • Members
  • *
Re: GasBomb Particle and Damage effect
« Reply #3 on: 29 Jul 2008, 12:23:32 »
I smell a chemical warfare addition.  :D Great job man.

I think it's time to model a gas mask; import it; create scripts to the action menu for putting on the gas mask and create a script that prevents the chemical effect from harming the player :cool2:
« Last Edit: 29 Jul 2008, 12:25:04 by CrazyAce »

Offline schuler

  • Contributing Member
  • **
Re: GasBomb Particle and Damage effect
« Reply #4 on: 29 Jul 2008, 12:53:34 »
hey could be good thing happening here!!!!! good job Odin
i enjoyed watching the men rolling on the ground.

but i smell WMD and if makes me wonder how many times the CIA has peaked in on this site.
@ CrazyAce  :good: yep!
Semper Fi

Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: GasBomb Particle and Damage effect
« Reply #5 on: 29 Jul 2008, 19:17:58 »
It has a huge range, which seems overpowered to me, however, a gas shell may realistically spread gas that far  :dunno:
gonna check it out and put it in an edit.


also the effet seems fine if your trying to simulate a nerve-agent (though it really takes four minutes of intense uncontrolled muscle contractions to die from VX: eventually from suffocation due the diaphragm spasming), but if you are trying to do a blister agent like mustard gas, or some other irritant, a bit overpowered. 
perhaps with the others, use a script to create the irritant's effect on the people, such as setunitpos down/up create random waypoints, add (Slow!!) amounts of dammage to those in range.  Mando has a chemical sadarm in one of his earlier missions that causes the vehicle's to vomit and fart, maybe you could ask mando use the vomit part with this, and if the player is in the range, use the disableuserimput command.

If you turn down the damage (and depending on what I find, maybe the range);
you could create a chemical sedan carbomb with this.
I've heard on the news that some suicide VBIEDs have put gallon jugs of chlorine gas to add lethatity when they detonate.

Hope all these ideas help you odin, and I'll get back to you on whether the range should be nerfed.

Luke
Pesky Human!!
Wort Wort Wort.

Offline Odin

  • Members
  • *
Re: GasBomb Particle and Damage effect
« Reply #6 on: 30 Jul 2008, 23:37:39 »
Thanx fellas  :D  Thats a great Idea CrazyAce go for it man. LOL CIA, would not surprise me in the least.
Thank again for that info Luke, I might model a more realistic one for an effects pack I was thinking of doing(Gasbomb, Killer fog, Shrapnel damage) I thought about doing random waypoints and such but sorta forgot ::) As for the range and lethality of the effect that can all be adjusted to suit the users need/mission. gota run Work time  :no:

Odin

Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: GasBomb Particle and Damage effect
« Reply #7 on: 31 Jul 2008, 06:06:02 »
Okay, Okay, got something:

inconclusive  :D

found nothing for certain other than general statements.

Could consider range limitation, however your call, as there is no reference.

Best thing I found was this link.

It's your call on what you wanna do, Odin.

Luke
Pesky Human!!
Wort Wort Wort.

Offline Odin

  • Members
  • *
Re: GasBomb Particle and Damage effect
« Reply #8 on: 01 Aug 2008, 09:03:19 »
Hey thx for that link Luke, nasty stuff those chemical weapon attacks :o, for the moment I am happy with the damage effects in this script, and like I said the user can tone it down or up to their liking aswell as distance and duration.

But I do like the Sedan idea, I will make one to suit for that, Current script uses a marker for the target, so I could have a seperate looped "gas" setMarkerPos (getPos carbomb) script running, and drop the missile effects and Bomb part then just use setDamage1 on the car and use a Check on the cars health to init the gasbomb so there will be no explosion at all but gas damage will be the same(maybe just a single 40mm just fo a wee bomb). I like that Idea :clap:

Still having troubles with getting the Missile effect to appear as if coming in on an angle but, hopefully I can get that part working in the next few days (between finishing an alpha version of a Campaign mission and testing the team's missions) I have been thinking on that WP effect you mentioned, and am gonna se if I can dig up a few examples to see how they workit.

Cheers
Odin

Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: GasBomb Particle and Damage effect
« Reply #9 on: 11 Aug 2008, 09:12:45 »
Odin,

After seeing your post on the advanced boards, and seeing how this angle problem is solved, do you think you could post a new version of your GasBomb with the new angle setting?/with reduced/configurable damage?

Just asking.  :)

Luke
Pesky Human!!
Wort Wort Wort.

Offline Odin

  • Members
  • *
Re: GasBomb Particle and Damage effect(Ready)
« Reply #10 on: 17 Aug 2008, 02:18:01 »
Heya Luke

Sorry for the slow response been busy renovating my Kitchen. New version uploaded, finished the carbomb version and added a Mapclick version aswell. 1st post has been updated with all the relevent info.

Thanx for you advice and help.
Odin

Edit; attachment removed 1st post updated
« Last Edit: 17 Aug 2008, 12:06:44 by Odin »

Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: GasBomb Particle and Damage effect(Ready)
« Reply #11 on: 17 Aug 2008, 05:50:13 »
Nice job man!!!  :D

...save one thing. :dry:

Getting lines of errors on the mapclick version. (you might want to stay that ready status  :()

Other than that, the init-ed one and the carbomb look great!!

Luke

P.S. hope the kitchen will be looking nice, too!
Pesky Human!!
Wort Wort Wort.

Offline Odin

  • Members
  • *
Re: GasBomb Particle and Damage effect(Testing)
« Reply #12 on: 17 Aug 2008, 08:47:07 »
Ahhh bugger, I have no Idea why that happened I tested it heaps and never gat any errors, but after your report I checked again, and there they were :o I will attemt to fix tis asap.  thx mate

Odin

hehe if the Wife likes the way the Kitchen looks it will look good :whistle:

Offline Imutep

  • ArmAdeus
  • Members
  • *
  • What?
    • Assault Mission Studio
Re: GasBomb Particle and Damage effect(Testing)
« Reply #13 on: 17 Aug 2008, 11:38:44 »
Nice effects Odin, but the error-message when using mapclick is also in your latest version. Can you fix it please?  ;)
Assault Mission Strudio<br />It\'s always something!!

Offline Odin

  • Members
  • *
Re: GasBomb Particle and Damage effect(Testing)
« Reply #14 on: 17 Aug 2008, 12:03:45 »
Fixed, appears I left an ";" infront of a important variable :-[ all good now.
original post updated.
Thx for the feedback.

Odin

« Last Edit: 04 Sep 2008, 14:10:43 by Odin »