OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: The-Architect on 19 Dec 2004, 10:01:29
-
is it possible?
Like maybe detecting if something other than a soldier is hit and if so, every 5th bullet or so would ping off in a random direction.
-
maybe - it depends is there a way to detect where a bullet hits the ground in an xyz coord? if there was you could camcreate one and give it a random velocity from where the bullet hit the ground.
-
nearestobject will pick up bullets..then use getpos....it would be possible, i think
-
So, anyone interested in giving it a go? I know most of you have your own projects but wouldn't it look great. especially at night.
-
like i said, i need to know if there is a command to find out where a bullet hits the ground
-
About camcreating bullets: if you have a TracerColor different from [0,0,0,0],
it would look bad. Try out: the tracer will stay on screen until the bullet hit
something or 'dies of old age'.
nearestobject will pick up bullets..then use getpos....it would be possible, i think
Yes, but you must catch the bullet from the fired EH. Otherwise you'll risk
to loose it.
So, anyone interested in giving it a go? I know most of you have your own projects but wouldn't it look great. especially at night.
check out my M1 with M2 turret and make a night mission with the AI as
gunner against an infantry squad.
Refer to this thread:
http://www.ofpec.com/yabbse/index.php?board=12;action=display;threadid=20613 (http://www.ofpec.com/yabbse/index.php?board=12;action=display;threadid=20613)
for link and info.
The ricochetting bullet is done with a 'drop'ped 3D object (that won't hurt
anyone). If you want the ricochetting bullet to make damage, I think you'll
have to camcreate an object, because as explained above it will look crappy
if you do this with a bullet that has a TracerColor different from [0,0,0,0].
like i said, i need to know if there is a command to find out where a bullet hits the ground
there's not such a command. But you can follow the bullet and when this
one is 'dead', look with nearestObject on its last known position for the
hole in the ground (that is, if it's not a drop effect).
I dropped the 3d object on the last known position, as the bullet can be
dead because it hit a target (even a tree, for example) somewhere.
-
I thought that this question might apply to the ricochet idea.
Since one can create drop particals at a requested velocity from the area of the death of the bullet, would it not be possible to project the partical with a relative velocity into a direction and then check to see if any objects are possibly in the path of the bullet. I have drawn a picture that might describe this better.
-
This might be interesting:
http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=053a6d345caaa433f4a044f677595b62;act=ST;f=4;t=44115
I think the addon itself is, well, quite shite but the richochets are awesome.
:beat: *Gets Shot* :beat:
-
Looks like this works.
Wasn't able to check to see if the richoched bullets did any dammage. Because I don't have v1.96 of ofpRes. Plus an error pops up, and it doesn't seem like it has to do with problems fixed in 1.96.
Anyway,
I'm wondering if anyone knows how to solve that question I mentioned before.
Thanks,
Bluelikeu
-
Perhaps instead of creating drops, checking path and the like, it would be
better before to try to make a tracer addon, that is a cilinder or a sphere
with the right texture (as the one used by the missile exhaust,
rocketsomething.paa), give it some weight (maybe 1 kg or more), config it
like a plane with destructType = destructNo, and when the right bullet is
fired (one in five) camcreate this tracer at the bullet location, give it the bullet
velocity so it will follow the bullet exactly, all with a function started by the fired
EH. When the bullet hit something, the tracer will hit that something too, and
since it's not a bullet, it will 'ricochet' (OFP physics should allow this). Then,
ricochetting at high speed with that mass, if it encounters a soldier it will damage
him. A script would delete it after 4 or 5 seconds (OFP bullets live about 3).
This is only speculative, as I haven't tried it yet. Anyway, if it works, you'll have:
- realistic and coherent trajectory (ballistic being the same as the bullet)
- ricochetting
- damage by ricochetting tracer
- the tracer will be visible even if FPS drop below 30.
- if the mass is right, a soldier being hit by a 'tracer' will 'feel' the shot, instead
of dropping dead on the spot like a potato sack