Welcome, Guest Saturday 19th April 2014, 03:22:13
   Home   Help Search Login Register  

OFPEC Forum

Author Topic: Laser Battery as Pistol Magazine  (Read 370 times)
0 Members and 1 Guest are viewing this topic.
JasonO
OFPEC Patron
****
Offline Offline


Oh no...


WWW
« 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
« Last Edit: 27 Dec 2009, 21:47:36 by JasonO » Logged

DeanosBeano
Addons Depot Staff
*****
Offline Offline


SirDeanosbeano bstowed on me by sui ;)


WWW
« Reply #1 on: 28 Dec 2009, 10:38:10 »

 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.



Logged

I love ofp
Gnat
Addons Depot
Administrator
*****
Offline Offline


I Bite!


WWW
« Reply #2 on: 29 Dec 2009, 10:16:30 »

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 ?
Logged
JasonO
OFPEC Patron
****
Offline Offline


Oh no...


WWW
« Reply #3 on: 30 Dec 2009, 00:34:24 »

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.
Logged

Gnat
Addons Depot
Administrator
*****
Offline Offline


I Bite!


WWW
« Reply #4 on: 30 Dec 2009, 07:08:38 »

Maybe make it a 1 round mag and re-fill it with the scripe each time.
_ship addMagazine "1Rnd_GNTDummyGunA";
Logged
JasonO
OFPEC Patron
****
Offline Offline


Oh no...


WWW
« Reply #5 on: 30 Dec 2009, 14:01:19 »

That's not a bad idea. If I cut the reload time it probably wouldn't be noticable.
Logged

Pages: [1]   Go Up
  Send this topicPrint  
 
Jump to: