truestiven Posted July 31, 2013 Share Posted July 31, 2013 (edited) Sorry for my bad English. Well, i trying to make mod with an upgrades for power armor. I create 2 armor-type items that don't have any "biped object" slot, selected. Now i need to write script that don't allowed wear both that items at the same time. Let's say names of items - "item1", "item2". I wrote script for item1: scn ScriptForItem1 Begin OnEquip player Player.UnEquipItem Item2 0 1 EndAnd script for item2 scn ScriptForItem2 Begin OnEquip player Player.UnEquipItem item1 0 1 End I add that scripts for items in items edit menu. But in game script don't work properly. I can wear both that items. How to fix that? Or maybe there is a better way to do that? Also sorry if i make topic on wrong forum section. Edited July 31, 2013 by truestiven Link to comment Share on other sites More sharing options...
jazzisparis Posted July 31, 2013 Share Posted July 31, 2013 Your method should work. I think you still see both items equipped because the inventory needs to refresh. Try closing and then re-open the inventory, and you will see that only one of the two items is equipped. Link to comment Share on other sites More sharing options...
luthienanarion Posted July 31, 2013 Share Posted July 31, 2013 As I recall, the inventory screen can be refreshed by removing an item from your inventory. You can add a pencil or something to your inventory and then remove it in both scripts, and it should show properly. Link to comment Share on other sites More sharing options...
truestiven Posted August 1, 2013 Author Share Posted August 1, 2013 Thanks, thats helped! As luthienanarion saying, i just add in inventory some item, and then remove that item, so inventory refreshed, and displayed properly. Link to comment Share on other sites More sharing options...
jazzisparis Posted August 1, 2013 Share Posted August 1, 2013 As I recall, the inventory screen can be refreshed by removing an item from your inventory. You can add a pencil or something to your inventory and then remove it in both scripts, and it should show properly.I used this trick on companions/NPCs to force them into re-evaluating their inventories. Good to know it also works on the player. :thumbsup: Link to comment Share on other sites More sharing options...
truestiven Posted August 1, 2013 Author Share Posted August 1, 2013 Well, i have another problem now. If i unequipped power armor, mods are do not unequipped as well. Do there exist any way to unequipped power armor mods(item1, item2 from example above) in exact same moment when player unequipped power armor? Well i can add few line in power armor script, but maybe it is possible to create some "base effect" (that i give to the player as perk) that will be active all the time, and will unequipping mods when players unequipped power armor? Link to comment Share on other sites More sharing options...
luthienanarion Posted August 1, 2013 Share Posted August 1, 2013 Add all of your PA mod items to a form list and pass the form list to UnequipItem to simplify that process. That way you can just add any new ones you create to the list and have them affected also. Yeah, you can have a script constantly running on the player if you set the actor effect as an ability. It's a bit complex writing the effect script, creating a base effect using the script, and creating an actor effect using the base effect, so you're probably better off making a scripted token if you're only applying it to the player. Link to comment Share on other sites More sharing options...
truestiven Posted August 7, 2013 Author Share Posted August 7, 2013 Add all of your PA mod items to a form list and pass the form list to UnequipItem to simplify that process. That way you can just add any new ones you create to the list and have them affected also.Did it. Yeah, you can have a script constantly running on the player if you set the actor effect as an ability. It's a bit complex writing the effect script, creating a base effect using the script, and creating an actor effect using the base effect, so you're probably better off making a scripted token if you're only applying it to the player.Please, do you can explain about how to create script constantly running on the player? I can, maybe, create infinite loop, but to where put that script? Also do there any way to run script at beginning of the game? I mean, well i need write script that at start of game adding all energyweapon to my custom form list. Link to comment Share on other sites More sharing options...
Recommended Posts