Rana Posted February 20, 2011 Share Posted February 20, 2011 Is there a way to force a character to de-equip an equipped weapon and have the item be placed in an available inventory slot? I am trying to create a script where if a character's reputation falls below a certain limit, the specific weapon they are using will refuse to be wielded by them until they atone by raising their reputation. I was able to 180 the item, but if the character has the weapon equipped when the 180 effect goes off, they'll still be able to use it so long as they don't try to change their weapon. Any ideas? Link to comment
Wisp Posted February 20, 2011 Share Posted February 20, 2011 You'd be wise to steer clear of anything that would require you to try to manipulate the inventory with either opcodes or scripts. In this case I think the closest approximation of the behaviour you want would be to have a script ActionOverride the creature to drop the weapon on the ground and then pick it back up. That should put your hackles up. Link to comment
cmorgan Posted February 20, 2011 Share Posted February 20, 2011 For script examples of what Wisp describes, Saerileth (lots of stuff) and Ajantis (family shield equipped on someone else) both have similar ideas implemented. I thought Amber did, too, but I can't find it right now. Be careful, though - adding lots of 'check the party inventory' has been anecdotally linked to script lag. You might be able to do something like actually adding a script to the weapon, and having that script do ActionOverride; I have never tried that, so i don't know if it is even possible. Link to comment
lynx Posted February 20, 2011 Share Posted February 20, 2011 Items don't have scripts, so no. Link to comment
Avenger Posted March 2, 2011 Share Posted March 2, 2011 Items don't have scripts, so no. Actually, you don't need the script to be run by the item. See the talking blade or the familiars in stock bg2. If you think baldur.bcs is overcrowded, you may try to use the other global script levels. I'm fairly sure this would work: baldur.bcs: if oncreation() then response #100 changeaiscript("items",DEFAULT) end Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.