How to check if any Weapon is equiped

Hi,

please could someone tell me how to code if any weapon is equiped to actor then unequip?

Thanks in advance. :)
 
Ehh this is inventory function pretty oblivious, Are you have some trouble with them?
upload_2018-5-25_6-42-41.png
 
Uhps,totaly forgot about that xml list,sorry will have a look inside thanks.
How does the inv_item_get_equipped_item return the weapon name and how do i get it to put it in inv_item_remove ?
 
How does the inv_item_get_equipped_item return the weapon name and how do i get it to put it in inv_item_remove ?
I guess its true or false :)No its string! But how do i get the string?
 
I belive this will work
Code:
function remove_current_weapon(ACTOR)
local current_weapon=inv_item_get_equipped_item(ACTOR)
inv_item_remove(current_weapon, ACTOR)
end
 
Last edited:
I belive this will work
Code:
function remove_current_weapon(ACTOR)
local current_weapon=inv_item_get_equipped_item(ACTOR)
inv_item_remove(current_weapon, ACTOR)
end
Thanks a lot but would it erase the weapons or just deselect.If i unequip an item in oblivion it stays in the inventory (console) if i unequipp all on char player in sriv it deletes all weapons.
I think i took the wrong function remove is better i guess.
 
Last edited:
Thanks a lot but would it erase the weapons or just deselect. If I unequip an item in oblivion it stays in the inventory (console) if i unequipp all on char player in sriv it deletes all weapons.
This function inv_item_remove removes an item from inventory if you want to deselect weapon you should set inv_item_equip_slot to the unarmed slot or so, but I don't know how it works with NPC
 
Last edited:
This function inv_item_remove removes an item from inventory if you want to deselect weapon you should set inv_item_equip_slot to the unarmed slot or so, but I don't know how it works with NPC
Ah,ok will test that.
 
Ah,ok will test that.
Ok after a few tests inv_item_equip(nil,ACTOR) did the trick.
If this function is used with "nil" wich means false not or 0 the current weapon will
be unequipped and automatically reequipped if the animation is done.
My mistake was to use inv_remove_all(ACTOR) wich removes all items from the inventory.
So i didn't noticed that the weapons of the Followers will be restored after action play.
 
Last edited:
Back
Top