Home
Intel Depot
Editors Depot
Missions Depot
Addons Depot
Forum
Home
Help
Search
Login
Register
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
Ammo Trobble With M16+M203 and kozlice
« previous
next »
Send this topic
Print
Pages: [
1
]
2
All
Go Down
Author
Topic: Ammo Trobble With M16+M203 and kozlice (Read 1748 times)
0 Members and 1 Guest are viewing this topic.
CopyrightPhilly
Guest
Ammo Trobble With M16+M203 and kozlice
«
on:
15 Apr 2004, 01:18:21 »
ok every other weapon work with the code i have been using but these to very anoying guns... what i want is for them to start with 1 round each so i used the following code...
===============================
M16 + M203 Code
===============================
_player=player
_wepmag="M16";
_wep="M16GrenadeLauncher";
_weap=PrimaryWeapon player
_player removeweapon _weap
_player addmagazine _wepmag
_player addweapon _wep
_player selectWeapon _wep
goto "done"
===============================
kozlice Code
===============================
_player=player
_wepmag="Kozliceshell";
_wep="Kozlice";
_weap=PrimaryWeapon player
_player removeweapon _weap
_player addmagazine _wepmag
_player addweapon _wep
_player selectWeapon _wep
goto "done"
===============================
This Methed Worked Fine For All The Others...
It Gives Me The Gun But Without The Ammo.
So Thanks In Any Advice You Game Give Me On This One...
Cheers, Philly
«
Last Edit: 15 Apr 2004, 01:19:29 by CopyrightPhilly
»
Logged
Kammak
Guest
Re:Ammo Trobble With M16+M203 and kozlice
«
Reply #1 on:
15 Apr 2004, 02:04:49 »
If you are not removing the original magazines somewhere, the new ammo won't get loaded. Removeweapon just removes the weapon, not its ammo too. If you add "removemagazines xxxx" before adding, it should work right.
However, does kozliceshell work? I don't think it does, only kozliceball. I don't think kozliceshell is in the config as an ammo type for the kozlice. You can give it to the guy, but it will never load into the shotgun and he will show zero ammo for his weapon, despite having kozliceshell in his inventory.
Logged
Planck
Honoured
Former Staff
I'm never wrong ....I'm just not always right !
Re:Ammo Trobble With M16+M203 and kozlice
«
Reply #2 on:
15 Apr 2004, 02:17:24 »
The following is from the config for the Hunter in Res:
magazines[]={"KozliceShell","KozliceShell","KozliceShell","KozliceShell","KozliceShell","KozliceBall","KozliceBall","KozliceBall","KozliceBall","KozliceBall"};
Planck
Logged
I know a little about a lot, and a lot about a little.
Kammak
Guest
Re:Ammo Trobble With M16+M203 and kozlice
«
Reply #3 on:
15 Apr 2004, 02:19:03 »
But what about the config entry for the kozlice weapon - does it show the shell as being an ammo?
It won't load on mine. Just the ball.
Logged
Kammak
Guest
Re:Ammo Trobble With M16+M203 and kozlice
«
Reply #4 on:
15 Apr 2004, 02:21:28 »
Make the player a resistance Hunter and check it out. I have no option to load the shell, and once the ball is all shot, thats it. The weapon shows no ammo and no option to load the shell shot - just ball.
The issue is the config entry for the weapon, not the vehicle.
Logged
Planck
Honoured
Former Staff
I'm never wrong ....I'm just not always right !
Re:Ammo Trobble With M16+M203 and kozlice
«
Reply #5 on:
15 Apr 2004, 02:24:17 »
I just tried it in the Editor.
I played as a HUnter so I had the kozlice.
To start off I was loaded with the ball, pressing space changed me to shell.
After firing the shell, I had to reload with R.
Planck
Logged
I know a little about a lot, and a lot about a little.
CopyrightPhilly
Guest
Re:Ammo Trobble With M16+M203 and kozlice
«
Reply #6 on:
15 Apr 2004, 02:28:21 »
ok is there anyway i can say to delete jsut the primary ammo like i did primary gun i tryed...
_mags=Primarymagazines player
but i just got an error, i dont want to to remove all the player ammo just its primary
Logged
Planck
Honoured
Former Staff
I'm never wrong ....I'm just not always right !
Re:Ammo Trobble With M16+M203 and kozlice
«
Reply #7 on:
15 Apr 2004, 02:31:28 »
I always thought removeAllWeapons removed the ammo also.
But I could be wrong there, try it anyway.
From Kozlice cofig:
class CfgAmmo
{
class default {};
class BulletSingle : Default
{ };
class KozliceBall : BulletSingle {};
class BulletBurst: BulletSingle {};
class KozliceShell : BulletBurst
{
hit=9;indirectHit=6;indirectHitRange=0.1;
};
};
Planck
Logged
I know a little about a lot, and a lot about a little.
CopyrightPhilly
Guest
Re:Ammo Trobble With M16+M203 and kozlice
«
Reply #8 on:
15 Apr 2004, 02:35:48 »
yes removeallweapons dose remove the ammo, but the part of the ALL means ALL so it deletes the player handguns and what ever else.
Logged
Kammak
Guest
Re:Ammo Trobble With M16+M203 and kozlice
«
Reply #9 on:
15 Apr 2004, 02:39:53 »
"removeAllWeapons"
does remove the ammo, but he has "removeweapon"
which just pulls the weapon but leaves the ammo.
CopyrightPhil - you call "player removemagazines xxxx" where xxx is the magazine name you want to remove.
RE: The Kozlice - you're changing the weapon? That is the trick! I assumed it would accept two types of ammo, I didn't think it had two different muzzles requiring a weapon change to get to fire shell! Thanks for the tip!
Logged
Planck
Honoured
Former Staff
I'm never wrong ....I'm just not always right !
Re:Ammo Trobble With M16+M203 and kozlice
«
Reply #10 on:
15 Apr 2004, 02:42:09 »
unit removemagazines weaponname
in your case
_player removemagazines _weap
Planck
Logged
I know a little about a lot, and a lot about a little.
CopyrightPhilly
Guest
Re:Ammo Trobble With M16+M203 and kozlice
«
Reply #11 on:
15 Apr 2004, 02:43:07 »
yea i'll put _player removeweapon "xxxxxx" put i need to type it 16 times over for 16 files lol
_player removemagazines "AK47"
_player removemagazines "AK74"
_player removemagazines "6G30"
_player removemagazines "HuntingrifleMag"
_player removemagazines "M4"
_player removemagazines "MM1magazine"
_player removemagazines "UZIMag"
_player removemagazines "FAL"
_player removemagazines "HKG3Mag"
_player removemagazines "G36aMag"
_player removemagazines "SteyrMag"
_player removemagazines "M16"
_player removemagazines "HK"
_player removemagazines "M21"
_player removemagazines "SVDDragunov"
_player removemagazines "BizonMag"
_player removemagazines "Kozliceshell"
well that makes 17 file now lol
Logged
CopyrightPhilly
Guest
Re:Ammo Trobble With M16+M203 and kozlice
«
Reply #12 on:
15 Apr 2004, 02:46:27 »
Still Trooble With The M16, Havnt Tryed The Other One Yet.
My M16 code is now:
======================================
_player=player
_wepmag="M16";
_wep="M16GrenadeLauncher";
_weap=PrimaryWeapon player
_player removeweapon _weap
_player removemagazines "AK47"
_player removemagazines "AK74"
_player removemagazines "6G30"
_player removemagazines "HuntingrifleMag"
_player removemagazines "M4"
_player removemagazines "MM1magazine"
_player removemagazines "UZIMag"
_player removemagazines "FAL"
_player removemagazines "HKG3Mag"
_player removemagazines "G36aMag"
_player removemagazines "SteyrMag"
_player removemagazines "M16"
_player removemagazines "HK"
_player removemagazines "M21"
_player removemagazines "SVDDragunov"
_player removemagazines "BizonMag"
_player removemagazines "Kozliceshell"
_player addmagazine _wepmag
_player addweapon _wep
_player selectWeapon _wep
goto "done"
======================================
so that didnt go to plan lol
Logged
Kammak
Guest
Re:Ammo Trobble With M16+M203 and kozlice
«
Reply #13 on:
15 Apr 2004, 02:47:08 »
Yeah the guide is misleading, it *says* you call "removemagazines weaponname", but it won't work. You have to actually use the *magazine* name.
I suppose it would work as listed on some of the default BIS weapons, but not all, and certainly won't work for most addon weapons where the magazine name is different from the weapon name.
Logged
CopyrightPhilly
Guest
Re:Ammo Trobble With M16+M203 and kozlice
«
Reply #14 on:
15 Apr 2004, 02:49:38 »
yea all the names are the right magaize names, i dobble checked that...
but still no darn luck
Logged
Send this topic
Print
Pages: [
1
]
2
All
Go Up
« previous
next »
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
Ammo Trobble With M16+M203 and kozlice
Top of page