Advertisement

Author Topic: JBOY Molotov Cocktail  (Read 2909 times)

0 Members and 1 Guest are viewing this topic.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
JBOY Molotov Cocktail
« on: 20 Dec 2008, 02:01:46 »
Tis the season for cocktails my friends...Molotov Cocktails!   :cool2:  My Xmas present to all the pyromaniacs in the community...

Demonstration video link:  http://www.youtube.com/watch?v=d0ReNnmPAnY

Addon required:   EditorUpdate_v102.pbo.

With this script, AI and players can throw Molotov Cocktails.

Features:
1.  Thrown grenade replaced by a bottle object.
2.  Bottle in-flight has flame and smoke trail.
3.  Bottle impact has glass breaking sound effect.
4.  Flame appears at point of impact (i.e., half-way up a wall, on the ground, side or roof of vehicle).  
5.  Flame attaches and moves with vehicles.
6.  Men hit with molotov cocktails will burn and die.
7.  Unarmored vehicles will take slow burn damage and eventually explode.
8.  Fires have burn sound effect.
9.  Men scream when burned.

Known Issues and Plans:
1. Death animations of men result in visual position of body not consistent with position returned by getpos.  This makes it impossible to keep the fire burning on the dead body.  To get around this I am forcing men down when burning, and re-setposing the body (so flame now on body).  The tradeoff is player may see abrupt anim change and body setposing.  I think this is better than flame appearing 1 or 2 meters away from dead soldier.

2. Performance issues may develop if you have many fires (many scripts playing fire anims and sounds).  Plan to only play a sound if there is not already another nearby fire playing a sound.  This will reduce sounds played.

3. Player will see Grenade as Selected Weapon.  I was hoping I could use a Ctrl Dialog to overlay the display of "Grenade" with "Molotov Cocktail", but there is no way to detect if Player has Grenade selected...

4. Cocktails will pass through window of cars, and through to other side.  This is because I am using a spawned bullet for collision detection, and bullets pass through windows.  

Plans for improvement:
A. Burn crew of vehicles if its an open vehicle.
B. Eject crew of vehicles if open vehicle.
C. Vehicle drive erratically if hit.
D. AI needs to react to incoming cocktails?
E. Add targeting function for AI to choose targets to throw at.
F. If player is burning, an evasive ROLL action may put out fire save him (if quick enough).

Will edit this post later with instructions on how to install and use...

Is it MP compatible?  Any other suggestions to make it perform better?

All feedback welcome.  

Changes:
- Dec. 20th:  Removed dependency on Editor addon.


Edit: images lost in crash of 2009, but demo mission re-upped, courtesy of fleepee - WEK
« Last Edit: 15 Jan 2011, 18:37:07 by Walter_E_Kurtz »
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: JBOY Molotov Cocktail
« Reply #1 on: 20 Dec 2008, 02:09:52 »
Will AI throw them?
Xbox Rocks

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: JBOY Molotov Cocktail
« Reply #2 on: 20 Dec 2008, 02:12:46 »
If scripted via UseWeapon command, for sure. 

And also whenever the normal ARMA AI instructs them to throw a grenade.  It is a fired eventhandler, so whenever grenade "fired", the script takes over.
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline Odin

  • Members
  • *
Re: JBOY Molotov Cocktail
« Reply #3 on: 20 Dec 2008, 02:57:28 »
 :D I love it JB this is gonna be fun for urban Riots, Maybe you could attach fire to the victims aswell that would be cool, i have a snippit somewhere for that, well I am off to flame the city of Corazol  :cool2:

Odin

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: JBOY Molotov Cocktail
« Reply #4 on: 20 Dec 2008, 03:05:13 »
Flame on Odin!  Flame does attach to victims.  Only I kill them quickly.

I wish there was a good panic anim or thrashing anim I could play on them, but there isn't.  So if I don't drop them to the ground right away, they calmly go about their business of walking or shooting while they are on fire (which looks really dumb).

I am loving this script though!
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline Odin

  • Members
  • *
Re: JBOY Molotov Cocktail
« Reply #5 on: 20 Dec 2008, 03:17:13 »
Cool played it again, I stand corrected :yes: Mwahahaha

Offline Knight Trane

  • Members
  • *
Re: JBOY Molotov Cocktail
« Reply #6 on: 20 Dec 2008, 18:28:18 »
I'm definately gonna try this.

Quote
I wish there was a good panic anim or thrashing anim I could play on them, but there isn't.

So do I.  I need civies to panic when the hordes come through.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: JBOY Molotov Cocktail
« Reply #7 on: 20 Dec 2008, 20:12:49 »
Video link added to first post.
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: JBOY Molotov Cocktail
« Reply #8 on: 21 Dec 2008, 14:02:06 »
Seems to require something called "editorupdate_102", or something like that..

EDIT:
Removed the dependency from the mission.sqm and the molotov won't work, so I guess it is required for that.  :P
« Last Edit: 21 Dec 2008, 14:04:29 by h- »
Project MCAR   ---   FWW2 - Finland At War 1939-1945
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: JBOY Molotov Cocktail
« Reply #9 on: 21 Dec 2008, 20:04:05 »
H, thanks for spotting that.

Its not really a dependency as the bottle objects are created via createVehicle.

I modified the mission file to remove the addon depencency, and re-uploaded the demo mission to the first post.  Should be fixed now. 

Edit:  Wrong!!!!  There is still a dependency on the addon.  Sorry about that.  I am working on it now... 
« Last Edit: 21 Dec 2008, 21:11:50 by johnnyboy »
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline snafu

  • Members
  • *
Re: JBOY Molotov Cocktail
« Reply #10 on: 22 Dec 2008, 13:06:40 »
Woah! I am very impressed! Reminds me of the fun I had with Gimbal's tosser addon back in OFP.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: JBOY Molotov Cocktail
« Reply #11 on: 31 Dec 2008, 23:13:42 »
Dunno if you have received any help on this, but I'll share something that might 'help' you.

ArmA is smart enough to include createVehicled stuff into the required addons in the mission.sqm which is why you get the editorupdate requirement:
If you have the editor addon installed, preview the test mission (and use the molotov) and save it the editor addon appears into the sqm because you use the bottle from that addon, and so it is required by the mission.

The problem is that even though the game files include several bottle models (that's where the editor update got it) they seem to not be available with the actual vanilla Arma :(, at least I couldn't find any entry for those in any config (well, Planck will correct this statement if they do have one ;) )..

So, to get rid off the addon requirement you either have to use some item already available in the game; closest one to a bottle would sadly be the OPFOR handgrenade model, or you just state that this editor update is required. :dunno:
Project MCAR   ---   FWW2 - Finland At War 1939-1945
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: JBOY Molotov Cocktail
« Reply #12 on: 31 Dec 2008, 23:48:21 »
Or you may just use a global initialized before using the script to define the class of object to be used. So, for an addon free demo you may just use the standard road cone.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: JBOY Molotov Cocktail
« Reply #13 on: 01 Jan 2009, 01:19:31 »
Thanks guys.  Since only the bottle looks good for this, I think I will just require the addon.

What is holding me up on this resource is making it MP compatible.  I asked some MP questions about this on this thread:

http://www.ofpec.com/forum/index.php?topic=32690.0

And Ionos gave me some advice on how to make it work.   I'm going to give it a try, but it sounds like a major re-write. 
« Last Edit: 01 Jan 2009, 01:24:30 by johnnyboy »
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: JBOY Molotov Cocktail
« Reply #14 on: 01 Jan 2009, 02:26:32 »
If you can find a solution without the addon, that is better for everyone. Its worth the extra effort :)
Xbox Rocks