Home   Help Search Login Register  

Author Topic: 2 primary weapons, possible?  (Read 803 times)

0 Members and 1 Guest are viewing this topic.

Gun_Nut

  • Guest
2 primary weapons, possible?
« on: 07 Aug 2003, 16:42:06 »
I am working in a single player mission, I want a script that allow
the player to switch his own gear during the game play, just think of it as
carrying two primary weapons .

Example: I am holding a MP5, and I want to use a M21 rifle, I switch from
               MP5 to M21, and switch back to MP5 when I am done.

I know I can switch weapon using 2 unit, player and an extra guy, but I
don't know how to count magazines and bullet number so that the bullets
and mags number are the same after you had switch back to your first gun,
any Ideas?  ???


Thx

GeneralCoder

  • Guest
Re:2 primary weapons, possible?
« Reply #1 on: 07 Aug 2003, 17:30:29 »
I am working in a single player mission, I want a script that allow
the player to switch his own gear during the game play, just think of it as
carrying two primary weapons .

Example: I am holding a MP5, and I want to use a M21 rifle, I switch from
               MP5 to M21, and switch back to MP5 when I am done.

I know I can switch weapon using 2 unit, player and an extra guy, but I
don't know how to count magazines and bullet number so that the bullets
and mags number are the same after you had switch back to your first gun,
any Ideas?  ???


Thx

; save current weapons
_weapons = weapon player
removeallweapons player

player addweapon"m21"
player addmagazine"m21"

and to get them back use _weapons to get weapon names

Well I can make this for you, takes a while...



GeneralCoder

  • Guest
Re:2 primary weapons, possible?
« Reply #2 on: 08 Aug 2003, 18:33:41 »
Well heres shometing what I worked out but it ain't berfect.

Becose...
Only one unit can use this script at time
This script doesn't suport typical ofp weapon handling,
so you should't take any weapons from ground, only magazines.
You have to load weapon your every time you change it.

Pleased?  ::)

Gun_Nut

  • Guest
Re:2 primary weapons, possible?
« Reply #3 on: 09 Aug 2003, 03:18:40 »
Cool...thx...I will try to correct the parts if I find a bug, and thx for
helping me out, I will make a credits of you in my mission :)

Thx again bro
« Last Edit: 09 Aug 2003, 03:20:39 by G8Sniper »

Gun_Nut

  • Guest
Re:2 primary weapons, possible?
« Reply #4 on: 09 Aug 2003, 18:33:24 »
Hmmm...something is wrong with the script, like if my M16 original had
4 mag, after I switched to M21, and switch back the M16, It had 3 mag left,
other parts seems to works fine, maybe it's better to use a second units, and
to switch the gear between 2 units, and let the second unit to hold your current gear, I am also working on it.

thx :)