OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: penguinman on 19 Apr 2005, 06:06:25

Title: Realistic bullet holes
Post by: penguinman on 19 Apr 2005, 06:06:25
could sombody make a particle that looks like a hole in a human made from a bullet, and then when sombody fires a gun a script finds the exact place the bullet stoped and pastes the particle there. it should be a 2d particle that shows you the same side always. that would make more realic wounds

thanks
Title: Re:Realistic bullet holes
Post by: Blanco on 19 Apr 2005, 08:14:12
Hmm, that particle have to follow the unit, doesn't this require a fast loop?
Title: Re:Realistic bullet holes
Post by: dmakatra on 19 Apr 2005, 15:09:48
Way too laggy, and won't look good either. Better to have hidden sections in the models instead.

:beat: *Gets Shot* :beat:
Title: Re:Realistic bullet holes
Post by: DBR_ONIX on 19 Apr 2005, 16:55:27
If you have someting like...
Inside guy/What you see when hit > |   Normal body    > |
                                                           | hiddenSelection > |

Then, when hit, you hide the normal body bit
- Ben
Title: Re:Realistic bullet holes
Post by: RujiK on 19 Apr 2005, 18:48:33
2D wound on units would look very lame, For when you walk around him OFTEN the wound would partitally go in the unit, thus making him look cured almost.

I would suggest OFPEC_Blood addon, it looks much better then a 2D wound, although It wont add textures on units.
Title: Re:Realistic bullet holes
Post by: penguinman on 21 Apr 2005, 03:35:57
well that just makes blood squirt, i wanted a bullet hole
Title: Re:Realistic bullet holes
Post by: Nemesis6 on 21 Apr 2005, 12:50:43
Which, unfortunatly, is impossible in OFP.
Title: Re:Realistic bullet holes
Post by: dmakatra on 21 Apr 2005, 22:25:35
2D wound on units would look very lame, For when you walk around him OFTEN the wound would partitally go in the unit, thus making him look cured almost.

I would suggest OFPEC_Blood addon, it looks much better then a 2D wound, although It wont add textures on units.
Dude, the official wounds are 2D. ::)

It could be very much possible in an addon. Very CPU demanding though.
Title: Re:Realistic bullet holes
Post by: Roni on 26 Apr 2005, 01:46:37
Hi There

I'm now teaching myself particle drops after years of avoiding them.  I don't know all of the variables in that massive array but there is ONE that might fit the bill - the last one.  It's called "Object" and according to the comref it's the "Object to bind this particle to".  Any guesses what this means ?

I just finished making a pretty cool (if I do say so myself) fire effect for a downed aircraft.  I'm using 3D particles (natch !) but I found that 3D particles can create a pretty nifty 2D effect.  If you place it right in the middle of the object and make it just big enough then the bits that stick out look kind of like a decal - there's your 2D effect (maybe).

Alternatively, I'm sure that there must be some way of accessing all of those wound BMP's in the master config.  This is beyond my knowledge (for now !) but it might solve your problem . . .

Cheers



roni
Title: Re:Realistic bullet holes
Post by: bdfy1 on 27 Apr 2005, 18:47:28
There are some sections in original config.cpp ver >1.91 that you should look at.
Quote
class CraterOnVehicle
{
model="";
simulation="CraterOnVehicle";
If you add model it will be placed on every vehicle or man when hit.
Quote
class Crater
{
model="";
simulation="Crater";
};
This option create crater on objects or house walls.
This info was first posted here (http://www.flashpoint.ru/forum/showthread.php?p=596696#post596696) ( russian ) not by me

I heard that there some realistic effects in 2k3 mod. i.e realistic wounds, shooting off body parts  etc . Is that true ? Mod  is too big for me to download :(
Title: Re:Realistic bullet holes
Post by: Roni on 28 Apr 2005, 00:10:20
That looks like it.

But what did you mean when you said "If you add model . . ." ?  How do you use this in game without having to create a special addon ?

Title: Re:Realistic bullet holes
Post by: bdfy1 on 28 Apr 2005, 00:48:05
model="<path to any model you like>";
you can insert any model there. Try nabojnice (it's shell ;)) just for example.
And search for names of standart BIS models
It's easy to create custom bullet wound plave it in addon and use  model="<\addon_name\modelname>
But note : it' cause both(!) vehicles and people :( there will be the same crater :(

And I didn't use it yet ;)
I just post info from russian site here
Title: Re:Realistic bullet holes
Post by: Planck on 28 Apr 2005, 00:54:00
Those are part of the cfgNonAIVehicles section of the game config.

I think it defines the crater effects.....for an example try:

cr = "Crater" createvehicle getpos [someposition]

or

cr = "CraterOnVehicle" createvehicle getpos [someposition]


Planck
Title: Re:Realistic bullet holes
Post by: Roni on 28 Apr 2005, 01:14:49
Ah, so it is an addon - I thought so.  No big deal, you just have to remember that you have the addon running in your version of the game.

I realised years ago that you could do all sorts of wierd things with addons.  For instance, since an addon can be just a config, and since a config can run scripts, you could make an addon that took away everyone's weapons at the start of the mission.

This might not be very useful   :P  but you could do useful stuff instead, such as replace in game soundeffects, change all recoils etc.
It's all good !



roni


Title: Re:Realistic bullet holes
Post by: penguinman on 30 Apr 2005, 01:26:49
roni, do you think you could make just a 2d particle thats just red andscript it so it pastes it in the place where the bullet hits.

the particle should be easy but i think the script might be harder

thanks
Title: Re:Realistic bullet holes
Post by: Roni on 30 Apr 2005, 02:53:33
I'll give t a try.   :-\

I do know that the standard "body" model has certain predefined areas that you can refer to, such as head, body, arms and kegs.  Of course, all of these are named in Czech and I'm not sure if you can refer to them in scripting (rather than in a config).

As I said - I'll see what i can do.

Cheers



roni
Title: Re:Realistic bullet holes
Post by: bdfy1 on 30 Apr 2005, 04:47:17
Roni
Check "dammaged" Eventhandler - it can return what part of body is hitted ;) Tutorial is in the editor depot.
Title: Re:Realistic bullet holes
Post by: Roni on 30 Apr 2005, 04:55:20
Thanks for the reminder.  I knew that I could get the part hitted  ;) but I'm not sure if you can then use that to paste a decal.

On the plus side there is hope to just plain faking it.  If my event handler tells me that (say) the character's arm was hit then I could design a position offset (_xPos + 0.2, _yPos + 0.1, _zPos + 1.5 ) and a fast loop to keep the decal in place.

I've just finished a smoke script for a cessna and even though the loop goes as fast as it can (delay of 0.01 seconds between cycles) it still shows "puffs" rather than a continuous stream once the plane speed goes above 200 kph or so.

Of course for a player running no faster than 12 kph this should not be too much of a problem !    ;D

I'll try to rig up something tonight (next 6-8 hours)


cheers



roni


 
Title: Re:Realistic bullet holes
Post by: penguinman on 06 May 2005, 00:48:41
is it working?
Title: Re:Realistic bullet holes
Post by: Roni on 09 May 2005, 14:08:59
Hello All

Okay, after four weeks of stuffing around with drop particles, workarounds and fudges I can conclusively say - this won't work !   :'(

It seems that even if a particle is tied to an object it doesn't stay with the object, it just takes on the objects position, velocity vector and facing at inception.  After that it's on its own.   :P

To make matters worse, the "drop" command returns nothing so you can't assign it and move it along with the person.  You could conceivably create particles VERY fast and have them live for a fraction of a second but if the unit moves too fast its "decal" tends to lag behind.  This is okay if you want the particle to look randomly uneven but bad otherwise.

On the plus side, if anyone is looking for a spurting blood wound then I'm with sure a few tweaks I could make what you're looking for !

Cheers



Rory