Home   Help Search Login Register  

Author Topic: GasBomb Particle and Damage effect(ACCEPTED)  (Read 9448 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 »

Offline Imutep

  • ArmAdeus
  • Members
  • *
  • What?
    • Assault Mission Studio
Re: GasBomb Particle and Damage effect(Testing)
« Reply #15 on: 17 Aug 2008, 15:26:06 »
Thx, now it works.  :good:
I've got the time to make a little demo movie. Nothing special.

Watch Odins GasBomb Particle and Damage effect
Keep up the good looking work, Odin.  ;)
Assault Mission Strudio<br />It\'s always something!!

Offline Manzilla

  • Members
  • *
Re: GasBomb Particle and Damage effect(Testing)
« Reply #16 on: 17 Aug 2008, 15:37:58 »
Wow he's really got this thing looking good. Great job on the update.

The FPS hit is too bad for me, but I got a pretty powerful system. Now I gotta try it with ArmAEffects and JTD Smoke.

Offline CrazyAce

  • Members
  • *
Re: GasBomb Particle and Damage effect(Testing)
« Reply #17 on: 17 Aug 2008, 16:15:55 »
I've got a dumb question, how can I switch the mortar rounds with this mod? As it is now the AI doesn't know how to use the mortar properly and think it would be best in conjunction with this mod.

Offline Manzilla

  • Members
  • *
Re: GasBomb Particle and Damage effect(Testing)
« Reply #18 on: 17 Aug 2008, 16:25:58 »
Christ crazy timing. I just asked for the same thing at that AddOns' BIS thread.

If this could work with that, I'd be a happy man.

Offline Odin

  • Members
  • *
Re: GasBomb Particle and Damage effect(Testing)
« Reply #19 on: 18 Aug 2008, 08:57:48 »
Wow thx Imutep  cool video :cool2: I like it,
Thx for the replies I am glad to hear it looks good.

As for the mortar round I am not to sure, I have no expierence yet at configs, but if you know how to do it feel free to use this effect, Probably use the carbomb script, as the missile tail and other things uneeded for that type of explosion are already deleted.

Thx all
Odin

Offline Manzilla

  • Members
  • *
Re: GasBomb Particle and Damage effect(Ready)
« Reply #20 on: 18 Aug 2008, 16:09:39 »
Thanks for that tip! :clap:

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: GasBomb Particle and Damage effect(Ready)
« Reply #21 on: 01 Sep 2008, 19:35:46 »
Bit petty, but I keep getting this in my arma.rpt:
Code: [Select]
File C:\Users\Spooner\Documents\ArmA Other Profiles\Spooner%20[RGG]\MPMissions\_gasbomb.Intro\description.ext, line 5: '.onloadmission': Missing ';' at the end of line
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Odin

  • Members
  • *
Re: GasBomb Particle and Damage effect(Ready)
« Reply #22 on: 02 Sep 2008, 01:45:37 »
Thanx Spooner, I am at a loss as to why I never recieved the message :scratch: But it was true I forgot to put it in ";".

All fixed now, Added a Readme, Briefing and Overveiw aswell.
 
1st post updated.

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

Offline i0n0s

  • Moderator
  • *****
Re: GasBomb Particle and Damage effect(Ready)
« Reply #23 on: 02 Sep 2008, 02:10:20 »
I took a look at those scripts and must sadly say, that the car bomb can't be used in different missions without custom work.
First please use _this as parameter for the car.
Then the script don't work in MP. Ok, it work in MP, but that requires to start the script on all clients for the effects. This will cause the damage to get executed on every computer. So imagine the damage being executed ten times ;)
So please consider those aspect in the next version of your script.

And don't take too long time, we nearly reached the point in the mission before a car bomb should explode ;)

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: GasBomb Particle and Damage effect(Ready)
« Reply #24 on: 02 Sep 2008, 02:38:48 »
You don't see it because it is a warning, not a true error, but appears in the logs.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Odin

  • Members
  • *
Re: GasBomb Particle and Damage effect(Ready)
« Reply #25 on: 02 Sep 2008, 02:43:06 »
OK thx i0n0s  I will revisit the carbomb script, I am a bit unused to MP scripting so to get it to work on all clients
do I use
Code: [Select]
if(local server)?

Cheers Odin

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: GasBomb Particle and Damage effect(Testing)
« Reply #26 on: 02 Sep 2008, 03:48:09 »
That is an old way of doing it and requires you to create a specifically named gameLogic. Instead, just use:
Code: (Don't run anything after this on a dedicated server. i.e. only run it on dedicated clients) [Select]
if (isServer and (isNull player)) exitWith {};

Many people will tell you to use something else, but it makes testing a lot harder:
Code: (Don't run anything after this on a server, including SP or host in MP game or editor) [Select]
if (isServer) exitWith {};
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline i0n0s

  • Moderator
  • *****
Re: GasBomb Particle and Damage effect(Testing)
« Reply #27 on: 02 Sep 2008, 04:01:29 »
Just use:
Code: [Select]
if (isServer) then {};and run the script on the server. Create the particlesources and lights global (createVehicle) and they will show up on all clients. The only problem is the drop and the flash.

Offline Odin

  • Members
  • *
Re: GasBomb Particle and Damage effect(Testing)
« Reply #28 on: 02 Sep 2008, 07:18:00 »
Thank-you both, As I am working with .sqs (I know get with the times man) would the correct syntax be
Code: [Select]
if (isServer and (isNull player)) then {exit}
I have fixed the Carbomb script, changed variable "carbomb" to _this, and removed the scripts dependency on a marker so now a Logic is created at trigger point instead, and the all the effects now call on the created logic, is this better for MP than using a marker? srry I am a noob at the mechanics of MP scripting.

Also should I add a server check to all scripts?

Thx Odin

Offline i0n0s

  • Moderator
  • *****
Re: GasBomb Particle and Damage effect(Testing)
« Reply #29 on: 02 Sep 2008, 11:33:33 »
To be honest: I don't see for what you need that marker or that logic. You only need the position of the car on the time of the explosion.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: GasBomb Particle and Damage effect(Testing)
« Reply #30 on: 02 Sep 2008, 19:41:04 »
You need
Code: (sqf) [Select]
if (isServer and (isNull player)) exitWith {exit}or
Code: (sqfs) [Select]
? isServer and (isNull player)) : exit
You don't absolutely need a check on every script (as long as they are only run by scripts that do have a check). Safest is just to put the check in every script.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Odin

  • Members
  • *
Re: GasBomb Particle and Damage effect(Testing)
« Reply #31 on: 04 Sep 2008, 14:09:41 »
Thx for the MP info mates  :good:
I have put the check into all the scripts, but unfortunatly I cannot test this in an MP enviroment with other players(no friends :weeping:).

Anyway here is the updated MP version, along with  a rewritten Carbomb script.

Thanx
Odin
« Last Edit: 04 Sep 2008, 14:23:23 by Odin »

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: GasBomb Particle and Damage effect(Testing)
« Reply #32 on: 04 Sep 2008, 15:51:11 »
It is quite possible to test MP on a single computer. Make sure you minimise all your graphics settings when running more than one client, or the machine will grind to a halt.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Odin

  • Members
  • *
Re: GasBomb Particle and Damage effect(Testing)
« Reply #33 on: 05 Sep 2008, 01:38:58 »
Thanx spooner, I tried the method you suggested, followed all the instuctions,lowered all the visual settings, but still get CTD  :(. Thanx anyways mate, I may just have to make a friend or wait for a nice person to give me some feedback.

Odin