Give officer new weapon?
Moderator: Moderators
-
SkinnyODST
- Lieutenant Colonel

- Posts: 545
- Joined: Mon Jul 04, 2016 10:56 pm
- Location: My other account
- Contact:
Give officer new weapon?
How do I give the clone officer an upgraded rep rifle? While keeping the stock one? Pretty much adding a new weapon
- AnthonyBF2
- Sith

- Posts: 1255
- Joined: Wed Aug 21, 2013 3:55 pm
- Projects :: PS2+PSP Overhaul
Re: Give officer new weapon?
Well the officer already has four weapons, so you'd add the following code:SkinnyODST wrote:How do I give the clone officer an upgraded rep rifle? While keeping the stock one? Pretty much adding a new weapon
Code: Select all
SetClassProperty("rep_inf_ep3_officer", "WeaponName5", "rep_weap_award_rifle")
SetClassProperty("rep_inf_ep3_officer", "WeaponAmmo5", "4")P.S. I strongly recommend you read the site's modding FAQ - repeatedly. You'll acquire a lot from it.
-
SkinnyODST
- Lieutenant Colonel

- Posts: 545
- Joined: Mon Jul 04, 2016 10:56 pm
- Location: My other account
- Contact:
Re: Give officer new weapon?
Thanks! But as I`m still new here I don`t know how to get to the faq`s...It`s probably really simple, but thanks againAnthonyBF2 wrote:Well the officer already has four weapons, so you'd add the following code:SkinnyODST wrote:How do I give the clone officer an upgraded rep rifle? While keeping the stock one? Pretty much adding a new weapon
4 is the number of clips, not bullets and I may be incorrect on the weapon name, you can see it's name in rep/odf if I misspelled it.Code: Select all
SetClassProperty("rep_inf_ep3_officer", "WeaponName5", "rep_weap_award_rifle") SetClassProperty("rep_inf_ep3_officer", "WeaponAmmo5", "4")
P.S. I strongly recommend you read the site's modding FAQ - repeatedly. You'll acquire a lot from it.
Oh and also, I changed around the officers loadout so the AWARD rifle is weapon 8. I changed the number to 8 after it didn`t work and it STILL doesn`t work
- Oceans14
- Command Sergeant Major

- Posts: 296
- Joined: Mon Apr 27, 2015 7:09 pm
- Projects :: Athenova Campaign
- Location: Planet 4546b
Re: Give officer new weapon?
The FAQ thread (found under SWBF2 Modding, where this thread is): viewtopic.php?f=27&t=13806
Also useful, the documentation that comes with modtools. These are found as .doc files within your modding directory, or here: https://sites.google.com/site/swbf2modt ... ng-started
It's a lot of information, but very useful. Sometimes when I'm bored I poke around the documentation and more often than not I learn something new (or get an idea for a possible map/mod
)
Also useful, the documentation that comes with modtools. These are found as .doc files within your modding directory, or here: https://sites.google.com/site/swbf2modt ... ng-started
It's a lot of information, but very useful. Sometimes when I'm bored I poke around the documentation and more often than not I learn something new (or get an idea for a possible map/mod
Unless the unit actually has 8 weapons, this probably won't work... Though I can't really confirm. I would set it up just as Anthony suggested and make sure you can get it working first, then make changes from there.I changed around the officers loadout so the AWARD rifle is weapon 8. I changed the number to 8 after it didn`t work and it STILL doesn`t work
- AnthonyBF2
- Sith

- Posts: 1255
- Joined: Wed Aug 21, 2013 3:55 pm
- Projects :: PS2+PSP Overhaul
Re: Give officer new weapon?
Oh I forgot, it's an award weapon so it has to be earned before you can switch to it in your inventory. 
You'd have to add a sixth weapon+ammo command for rep_weap_inf_rifle so the commander can use that to unlock the award rifle.
You'd have to add a sixth weapon+ammo command for rep_weap_inf_rifle so the commander can use that to unlock the award rifle.
