OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Ice Man 3:16 on 08 Aug 2004, 00:09:57

Title: Ultra realistic weapons
Post by: Ice Man 3:16 on 08 Aug 2004, 00:09:57
I'm doing reserch for my next mod project thats going to be an urban warfare mod.  I want all of the weapons to be Ultra realistic (the shell casings stay on the ground, tracers every three shots, animated bolts and slides that lock back when empty and forward when reloaded)  Iv'e figured out how to do everything except i want to make it so when you reload a magazine falls on the ground.  I have no idea how to get this too work.  I know you could probably have a setaction script that says on reload eject a magazine at a certin height, or have the magazine eject the saem way a shell casing does (i have an idea of how to stop it from flying up into the air).

Anyone have any ideas?
Title: Re:Ultra realistic weapons
Post by: oyman on 08 Aug 2004, 15:48:50
you could try hidden selections and the drop command
Title: Re:Ultra realistic weapons
Post by: Ice Man 3:16 on 08 Aug 2004, 21:21:14
you could try hidden selections and the drop command

How would i do that?
Title: Re:Ultra realistic weapons
Post by: Ice Man 3:16 on 10 Aug 2004, 22:51:12
this is what i was thinking i could add to the config for the gun

Code: [Select]
class EventHandlers
{
reload = "_this exec {"magdrop.sqs"}";

then have a .sqs file something along the lines of

Code: [Select]
"M4magobj" createobject  [getpos this; setheight = 2]

goto "end"
#end

this is just a rough outline of course, but its a start.  I'm hoping all of this can be contained in the guns .pbo file because i hate adding things into the readme files like "you have to put this line into the soldiers init to get it to work" then if your playing as a soldier who doesn't have that line in their init you don't get that effect.
Title: Re:Ultra realistic weapons
Post by: oyman on 11 Aug 2004, 16:54:49
im sure a more advance version of that way will work
Title: Re:Ultra realistic weapons
Post by: DBR_ONIX on 16 Aug 2004, 13:00:25
That sorta idea should work.. But if they're prone, it'll not work..
So just create the mag on the ground.. The player wont ever see it (It's under the weapon, after all)
Not sure how it'll look with AI units though..
And you have to check it's the right weapon being reloaded..

In that reload action thing.. The first line would be to hide the mag (Setobjecttexture or a hidden selection), then make the thing drop to the ground, then use the right lenghts of pause, and unhide it..

Gd luck :)
- Ben