OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Resources Beta Testing & Submission => Topic started by: johnnyboy 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. (http://www.ofpec.com/addons_depot/index.php?action=details&id=20)
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
-
Will AI throw them?
-
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.
-
: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
-
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!
-
Cool played it again, I stand corrected :yes: Mwahahaha
-
I'm definately gonna try this.
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.
-
Video link added to first post.
-
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
-
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...
-
Woah! I am very impressed! Reminds me of the fun I had with Gimbal's tosser addon back in OFP.
-
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 (http://www.ofpec.com/addons_depot/index.php?action=details&id=20) is required. :dunno:
-
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.
-
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.
-
If you can find a solution without the addon, that is better for everyone. Its worth the extra effort :)
-
I see no solution to the bottle (addon) problem.
Either you go with the Editor102 requirement for the mission, or ...
You make your own little config.cpp that configs the bottle (or several different bottles), then PBO it as a custom config addon which you can package with the mission, with instructions to throw it in Addons.
Planck
-
Planck,
I've never made a config.cpp addon. Can you (or anyone) recommend a dead-simple single object addon somewhere that I could use as an example?
-
Here you go, this one works, I tried it in your mission after I edited the bottle class in your files.
Planck
Edit: Attachment (JBOY_Molotov.rar) lost in crash of 2009 - WEK
-
Wow Planck, thanks a million!
It works beautifully. My addon learning curve would have been very steep...so you really saved me tons of work. Much appreciated.
Now back to my MP conversion hell on this...
-
If you cant select the bottle because it is protected or not even configed ,you could drop the shape of the bottle simply by pathing the p3d correctly, this will give you a random turning effect also i believe . not looked at your scripts but this maybe a way for you to achieve this without the need for an addon.
as for your Now back to my MP conversion hell on this.
my own snowballers maybe similar to this and they work in mp , look in addons and mods beta. feel free to abuse anything ya like in there regarding this.
-
Completely and utterly forgot you could always use it as a particle.
Would be ideal because then there would be no addon requirements..
-
This is a very good script, and very fun to use, EXCEPT
- Its not MP compatible!
i tryed to use it in one of my Afghan misions, and when one of us would throw a Molotov, only we could se our own molotov.
If you make it MP compatible itle be great!
-
Curatalo: Glad you like the script. I think its fun too! I put many hours into trying to make it MP compatible, but failed. I plan to post an improved SP version soon.
And maybe I will post my attempt at MP compatible version, but it has real problems still. Very complex problem...for me anyway.
-
Hello. Does anybody have my sample mission that was linked to the first post on this thread?
I lost my hard drive a while back, and lost these scripts. And OFPEC lost it it too... :weeping:
Please post it here or PM me if you have this script. Thanks!
-
Here it is!! :good:
Edit: re-attached to first post -WEK :good:
-
You the man Feepee! Muchas gracias! :clap:
Why should I ever back up my HD when all you guys have all my scripts? ;)