Companion equipswitch weapon of your choosing

Post » Sun Jun 23, 2013 4:53 pm

Hey everyone, been working on this mod that allows player to equip their companions with any weapon they choose without going through dialog

currently i have 5 teams, alpha - echo and 8 weapon slots,

the problem i am having right now is giving npc the weapon by using an item that has a script attatched. the same script works it its attatched to a button..so i don't know what's happening here

can anyone help?

below is a snipit of the code and the player add item part is for testing purposes

in this example, toggle is controlled by a onActivate block

however if i apply something similar on an item it always seems to fail at these two lines

set weapon to StaticTeamWeaponSlot1Ref.GetInventoryObject itemsInContainer

and
set weaponAmmo to weapon.GetWeaponAmmo weapon

so any help will be appreciated, thanks

if toggle == 1set itemsInContainer to StaticTeamWeaponSlot1Ref.GetNumItemsif itemsInContainer >= 1set itemsInContainer to 1set toggle to 2elseset toggle to 0endIfelseIf toggle == 2set weapon to StaticTeamWeaponSlot1Ref.GetInventoryObject itemsInContainerset itemsInContainer to 0set weaponAmmo to weapon.GetWeaponAmmo weaponset toggle to 0showMessage StaticTeamWeaponSlot1SetPLAYER.ADDITEM WEAPONAMMO 100PLAYER.ADDITEM WEAPON 1 1PLAYER.EQUIPITEM WEAPONendIf
User avatar
Svenja Hedrich
 
Posts: 3496
Joined: Mon Apr 23, 2007 3:18 pm

Return to Fallout 3