OFPEC Forum
Addons & Mods Depot => Arma2 - Configs & Scripting => Topic started by: JasonO on 27 Dec 2009, 21:43:54
-
Hey everyone,
This may seem like a weird one, but.... how would I make my own Magazine (which is just a newly defined magazine inheriting everything but the name from the laser batteries) work with a pistol so that it has the same function as the laser marker?
Basically I want it so when the pistol is fired it doesn't fire anything, but simply turns something on or off in a script. The laser marker does exactly that job and its something I want to replicate with my own battery magazine and handgun model.
I tried copying the config and even assigning my pistol to use the laser batteries and it did not work.
Does anyone know a work around to what I need to achieve, or have I missed something?
Thanks for your help, hope everyone had a good Christmas.
Regards,
Jason
-
Hmm
you have many choices , the easiest is probably for you to replicate the laser config , the unit ,the ammo the magazine and simply change the model to your gun model , the anim may need changing too to the pistol one.
Problem with laser is it has a different simulation and because of this your pistol wont fire the laser magazines .
the only other alternative i can think of is to replicate your pistol Magazines and give them new ammo no sound and no Hit values , this way you can shoot it and nobody will get hurt , for this you will have to inherit your new ammo and magazine from a class that the pistol already shoots.
-
Yeh, tough one.
The laser-Des stuff is very much hard-coded into the game, and offer little in the way of variance.
Not sure if a weapon (im not a weapon mod'er) can have a "Fired" EH assigned permanent (like a vehicle addon).
If so, then its probably a simple matter of assigning a script or two to the trigger and arming it either as a laser-Des or a normal gun with "dummy" ammo.
We're you expecting AI to use it when pointed at enemy ?
-
Only the player would use it, no AI.
The two reasons I wanted it was firstly, so the ammo showed as 1 and never went down (like actual ammo) and secondly so I can get a script to go off.
At the moment it actually uses real ammo and works off the fired event handler which works fine. I suppose I could make a large ammo count in the magazine, remove recoil and any muzzle detail etc.
-
Maybe make it a 1 round mag and re-fill it with the scripe each time.
_ship addMagazine "1Rnd_GNTDummyGunA";
-
That's not a bad idea. If I cut the reload time it probably wouldn't be noticable.