Page 1 of 1

Give officer new weapon?

Posted: Sat Jul 16, 2016 3:07 am
by SkinnyODST
How do I give the clone officer an upgraded rep rifle? While keeping the stock one? Pretty much adding a new weapon

Re: Give officer new weapon?

Posted: Sat Jul 16, 2016 5:21 am
by AnthonyBF2
SkinnyODST wrote:How do I give the clone officer an upgraded rep rifle? While keeping the stock one? Pretty much adding a new weapon
Well the officer already has four weapons, so you'd add the following code:

Code: Select all

SetClassProperty("rep_inf_ep3_officer", "WeaponName5", "rep_weap_award_rifle")
SetClassProperty("rep_inf_ep3_officer", "WeaponAmmo5", "4")
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.

P.S. I strongly recommend you read the site's modding FAQ - repeatedly. You'll acquire a lot from it.

Re: Give officer new weapon?

Posted: Sat Jul 16, 2016 6:06 am
by SkinnyODST
AnthonyBF2 wrote:
SkinnyODST wrote:How do I give the clone officer an upgraded rep rifle? While keeping the stock one? Pretty much adding a new weapon
Well the officer already has four weapons, so you'd add the following code:

Code: Select all

SetClassProperty("rep_inf_ep3_officer", "WeaponName5", "rep_weap_award_rifle")
SetClassProperty("rep_inf_ep3_officer", "WeaponAmmo5", "4")
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.

P.S. I strongly recommend you read the site's modding FAQ - repeatedly. You'll acquire a lot from it.
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 again
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

Re: Give officer new weapon?

Posted: Sat Jul 16, 2016 10:55 am
by Oceans14
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 :) )
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
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.

Re: Give officer new weapon?

Posted: Sat Jul 16, 2016 11:13 am
by AnthonyBF2
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.