Home   Help Search Login Register  

Author Topic: Different grenades (flashbangs? willie petes?)  (Read 2292 times)

0 Members and 1 Guest are viewing this topic.

Offline ryankaplan

  • Members
  • *
  • yeah...
Different grenades (flashbangs? willie petes?)
« on: 22 Dec 2004, 15:30:27 »
ok, while a mp coop game with my clan, we were in a hard position, we were in a bollocked position. somebody randomly said...."flashbangs is what we need...".
hmmm
so i gave it a little thought and seeing has i'm have very little knowledge about making addons i decided to write my ideas here.

Flashbang grenade: i would think this would be a hard one to do and i do not know how you could make it work against ai. for players, maybe you could bring up a white texture around the whole screen if they are looking at it or something, but with ai.... and there is the problem of if the ai is facing the grenade or not. so if the ai is 5metres close to the greande, they will be deafened regardless of which way they are looking and if they are between 5-20 metres than only if they are facing the grenade. the grenade would obviously will have to be timed, and i've seen this done before (dunno where sorry.)

Incendiary WP (Willie Pete or White Phosphorus) Grenades: this would be an easy one for anyone whoh knows their stuff. it can work like a normal grenade, only when it explodes, it will use the drop command to drop some fire and smoke effects or something. anything within a 10 metre radious will be consumed, and they will die and if possible, their bodies will keep burning for half a minute or so, just for the good effect.

Gas grenades: same effects as smoke but any ai caught in it will not be able to shoot or something. dunno how we could implement it with people though.

Anyway, is anyone interested in creating such an addon? i beleive it would really add to the game and it would be quite an original addon. please post some comments here, i would like to here what other people think about this and how it could be done.


Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Different grenades (flashbangs? willie petes?)
« Reply #1 on: 22 Dec 2004, 21:54:57 »
white phosphourus has been done
I started making a flashbang a while ago, but i was a noob and i fooked up the scripting and stuff.
gas nades wouldn't be too hard...

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Different grenades (flashbangs? willie petes?)
« Reply #2 on: 22 Dec 2004, 23:12:45 »
I've pondered with the idea of making these as well. Here is how would imagine they could be done:

First off, you would need an array of all units that are within a certain radius of the grenades. If we had VBS1, we could create triggers and this would be easy. However, we can't do that, so our only options are: (a) have the mission editor place a trigger of the desired radius, or (b) add every unit in the mission to an array, and when the time comes, find out which ones are close enough to the grenade to be affected.

(a) would probably run better, and you wouldn't have to worry about weird things like units created after the start of the mission, but there might be problems if two grenades are thrown at the same time (or close to it). So I'm not sure which method would work best.

Anyway, so once the grenade is thrown, and an array of all units within it's effective radius has been made, this is how I think you could do the effects:

Flashbang: Use the getdir command to see how much units are facing the grenade when it goes off. You could then scale the intensity/duration of the effects depending on how much they are facing it. With players, use a fadeout (white) as you suggested, along with fadesound and a nice ringing of the ears sound via playsound. I'm not so sure what to do for the AI, except setskill to 0. Possibly for both AI and players, setdammage them to a negative number, which then makes their aim wobble terribly. Setskill and setdammage back to original values when the effect is over, or perhaps smoothly transition back.

WP: Don't know a whole lot about how these work, but your suggestion about them being like regular 'nades, only with added drop effects might be good.

CS Gas: Config like a regular smoke grenade. All units within the effective radius could just be switchmoved into a custom animation that shows them coughing, vomiting, etc. Perhaps this anim could occur at random intervals, and in the meantime they could be setdammaged to a negative number, as with flashbangs. Of course, if you were going to make these, you would also want to make a gasmask addon that, when equipped, would render the unit immune to these grenades.

Anyway, those are my ideas on how they could be done.


HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

DBR_ONIX

  • Guest
Re:Different grenades (flashbangs? willie petes?)
« Reply #3 on: 23 Dec 2004, 00:58:02 »
For the "is that guy looking at the 'nade" : http://www.ofpec.com/yabbse/index.php?board=10;action=display;threadid=20541
The code is on there ;)
- Ben

Offline ryankaplan

  • Members
  • *
  • yeah...
Re:Different grenades (flashbangs? willie petes?)
« Reply #4 on: 23 Dec 2004, 14:39:32 »
so, is anyone going to attempt to make it? i can always help with the textures if you want

Dubieman

  • Guest
Re:Different grenades (flashbangs? willie petes?)
« Reply #5 on: 23 Dec 2004, 19:04:17 »
If you check the HRV Hind addon in pending, they have a napalm bomb that looks pretty good. If you are in it or near it you take damage, units usually fall pretty quick but vehicles take a few more seconds, maybe 20?

Otherwise I'm gonna agree with everyone's else's opinions on the other nades. :)

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Different grenades (flashbangs? willie petes?)
« Reply #6 on: 24 Dec 2004, 04:18:40 »
I've picked up my old flashbang, and i'm fixing it up good, so If someone wants to do the others, we could put em all to gether in a nade pack thing

Offline ryankaplan

  • Members
  • *
  • yeah...
Re:Different grenades (flashbangs? willie petes?)
« Reply #7 on: 24 Dec 2004, 16:35:32 »
well than, i will see if i can create the wp grenade with the help of a few from my clan.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Different grenades (flashbangs? willie petes?)
« Reply #8 on: 24 Dec 2004, 17:08:15 »
about the flashbang: how exactly would I use the fired eh to tell if it is the flashbang or something else? the EH has to be attached to a unit, so i would have to add it to all the units... I hope i'm way off, that will be a pain in the arse

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Different grenades (flashbangs? willie petes?)
« Reply #9 on: 25 Dec 2004, 10:42:01 »
about the flashbang: how exactly would I use the fired eh to tell if it is the flashbang or something else? the EH has to be attached to a unit, so i would have to add it to all the units... I hope i'm way off, that will be a pain in the arse
Yeah, for any scripted stuff, you're gonna have to use a fired EH, which means the editor has to manually put it on all the units that will use the grenades. Oh well, we're all big boys and can paste stuff in init fields. :P

Anyway, check this tut out for more info on EHs:



To sum it up, (_this select 4) of the EH holds the type of ammo fired. So just compare it to the classname of your grenade, and you're off:

Code: [Select]
if((_this select 4) == "flashbang") then {_this exec "flash.sqs"}
Then, at the start of your flashbang script, you can "catch" the fired grenade by doing this:

Code: [Select]
_bang = nearestobject [_this select 0, _this select 4]
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline ryankaplan

  • Members
  • *
  • yeah...
Re:Different grenades (flashbangs? willie petes?)
« Reply #10 on: 25 Dec 2004, 15:00:24 »
Trigger Happy, after your done with your grenade, can you send it to me, because i am not sure on how to do a few things.

oh and if we're not "big boyz" we can always use the
{_x addeventhandler blah blah} foreach thislist.
:P :D

« Last Edit: 25 Dec 2004, 15:00:47 by ryankaplan »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Different grenades (flashbangs? willie petes?)
« Reply #11 on: 26 Dec 2004, 02:25:20 »
what we could do is distribute it with "templates"
basically each of the original maps (and nogova) with a bunch of triggers on it for what we need, i'm thinking just one big trigger covering the whole area

Offline ryankaplan

  • Members
  • *
  • yeah...
Re:Different grenades (flashbangs? willie petes?)
« Reply #12 on: 01 Jan 2005, 15:58:05 »
so, how's it been going t-happy? any updates?

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Different grenades (flashbangs? willie petes?)
« Reply #13 on: 01 Jan 2005, 16:56:19 »
it might take me a while cause i'm working on a few things right now.
hope thats ok  :P

Offline ryankaplan

  • Members
  • *
  • yeah...
Re:Different grenades (flashbangs? willie petes?)
« Reply #14 on: 02 Jan 2005, 17:31:23 »
sure, take your time. i ain't exactly paying you for it :P