#10581 [All] The main screen's Quick Weapon slots should reflect ammo change by script
Belanos
Member Posts: 968
I'm using a script that has my characters automatically switch their ammo slots depending on the enemy they're facing. I'll have one slot for magical ammo for those creatures that are immune to normal weapons, then when the battle is over they'll switch back to normal ammo. While I can see in their inventory screen that they're performing the switches, the HUD slot doesn't show the change. Also if I manually switch their ammo slots, and they switch back to their normal ammo, the GUI is not updated. It will keep on showing the magical ammo I switched them to even though I see in the inventory screen that they're no longer using it. Which makes it a bit of a pain to make sure they're using the type of ammo I want them to.
Post edited by Jalily on
0
Comments
[Spoiler]
IF
ActionListEmpty()
CombatCounter(0)
THEN
RESPONSE #100
EquipRanged()
SelectWeaponAbility(SLOT_AMMO,0)
Continue()
END
[/spoiler]
This is the one that has them switch to magical ammo if they see an enemy that requires it:
[Spoiler]
IF
!CombatCounter(0)
!InParty(LastSeenBy(Myself))
!Range(LastSeenBy(Myself),4)
Range(LastSeenBy(Myself),8)
OR(8)
Race(LastSeenBy(Myself),GOLEM)
Race(LastSeenBy(Myself),SHADOW)
Race(LastSeenBy(Myself),IMP)
Class(LastSeenBy(Myself),WOLF_DIRE)
Class(LastSeenBy(Myself),WOLF_VAMPIRIC)
Class(LastSeenBy(Myself),GHOUL_GHAST)
Class(LastSeenBy(Myself),GHOUL_REVEANT)
Class(LastSeenBy(Myself),SPIDER_WRAITH)
THEN
RESPONSE #100
RunAwayFrom(NearestEnemyOf(Myself),6)
EquipRanged()
SelectWeaponAbility(SLOT_AMMO2,0)
Continue()
END
[/Spoiler]
Later on comes the bit about attacking the LastSeen enemy. They do seem to be doing what the script tells them to, I've looked inside the inventory screen from time to time, but it's not being shown on the main screen GUI. I'm not sure if this is just an IWD problem, it could very well apply to all the games. I've just become aware of it recently. This is actually a script I was using in the other two games originally BTW, I've just been adapting it to IWD.
1) I assume the script is switching between two already slotted arrow types (i.e. you have normal arrows in missile slot 0 and magical missiles in missile slot 1)? Or is it actually replacing (equipping / unequipping) magical ammo and normal ammo from your inventory slots?
2) In the Inventory screen, after running the script that changes your basic arrows out for magical arrows (for instance) you'll go to your missile slots above your main hand weapon slots and see the magical arrows in one of the three arrow slots and it will be highlighted in Green. But when you close the inventory screen and go back to the main interface, the arrow that shows in the quick weapon slot on your main screen associated with the bow still shows the normal arrow picture? Or is there somewhere else you're looking in the interface to see what kind of arrow you have equipped?
3) This is a graphical issue only right? The actual arrows that are being fired are either Magical or Non-Magical respectively depending on which script ran, despite what the main interface is showing you? And the RIGHT arrows are decreasing in amount in your inventory when they fire correct? (i.e. Even if it's showing you non-magical arrows, when you fire your bow the count of magic arrows is decreasing as it should be?)
Just trying to figure out what exactly is not showing up correctly.
Thanks for the help! Please keep an eye on the thread every day or two in case one of the Devs has more questions.