Problem with DropObject and arrows

Post » Tue Jun 19, 2012 12:45 pm

Hi everyone,

I'm using
Player.DropObject(ThisItem, nDropNow)
to drop arrows from the player's inventory.

This works fine, the counts of arrows before drop, arrows on the floor and in inventory after drop do sum up and the bow running out of ammo is consistent with the number of arrows displayed in the inventory.

One thing however does not work: the counter of equipped arrows on the screen's right bottom does not decrease when arrows are dropped, so it shows a number that's higher than correct.

Only an annoyance, any idea how to fix this? (opening the inventory during drop is not an option).

Thanks in advance!
User avatar
Jessica White
 
Posts: 3419
Joined: Sun Aug 20, 2006 5:03 am

Post » Tue Jun 19, 2012 7:08 pm

You could try unequipping then equipping the remaing ones via script?
User avatar
kitten maciver
 
Posts: 3472
Joined: Fri Jun 30, 2006 2:36 pm

Post » Tue Jun 19, 2012 8:47 pm

You could try adding one arrow and then removing it with additem/removeitem. Not sure, but it could reset the ammo displayer to it's correct value. By the way. Are you trying to make a machinegun?
User avatar
Crystal Clear
 
Posts: 3552
Joined: Wed Aug 09, 2006 4:42 am

Post » Tue Jun 19, 2012 11:00 pm

I tried your suggestions,

@PhiniusMaster:
Re-equipping seems to work. I'll have to playtest to see if the script will regularly unequip arrows from the drawn bow.

@amgepo:
Adding/Removing doesn't fix the counter. And no, no machinegun, the game is easy enough ;-)
Just a simple mod to prevent the player from carrying an excessive amount of arrows (see http://skyrim.nexusmods.com/downloads/file.php?id=11322).

Thank you for your answers!
User avatar
SamanthaLove
 
Posts: 3565
Joined: Mon Dec 11, 2006 3:54 am


Return to V - Skyrim