mkeller
Sergeant at Arms
I don't mind telling everyone, so here goes:
Basically, to make sure that the guns only fire bullets of their caliber, I remove any guns at the start of a battle that do not have a proper ammo item to go with them, and replace it with a hand-to-hand weapon (which, when finished, will look like a clubbed rifle, held by the barrel), like this:
and then give the gun back after the battle, like this:
One problem with this method is that the melee rifle is not equipped, so to use it, you have to go to your inventory chest in the battle and get it out, which is rather a not good way of doing things. So what I may do have a special mission template that equips you with the rifle, rather than adding it to your inventory, and use that template whenever you're out of ammo. Not certain whether it'll work, though . . .
Basically, to make sure that the guns only fire bullets of their caliber, I remove any guns at the start of a battle that do not have a proper ammo item to go with them, and replace it with a hand-to-hand weapon (which, when finished, will look like a clubbed rifle, held by the barrel), like this:
Code:
(try_begin),
(neg|troop_has_item_equipped,"trp_player","itm_minie_ammo"),
(try_begin),
(troop_has_item_equipped,"trp_player","itm_springfield"),
(troop_remove_item,"trp_player","itm_springfield"),
(troop_add_item,"trp_player","itm_melee_rifle",0),
(assign,"$springfield_taken",1),
(try_end),
(try_end),
Code:
(try_begin),
(eq,"$springfield_taken",1),
(try_begin),
(troop_remove_item,"trp_player","itm_melee_rifle"),
(troop_add_item,"trp_player","itm_springfield",0),
(assign,"$springfield_taken",0),
(try_end),
(try_end),
One problem with this method is that the melee rifle is not equipped, so to use it, you have to go to your inventory chest in the battle and get it out, which is rather a not good way of doing things. So what I may do have a special mission template that equips you with the rifle, rather than adding it to your inventory, and use that template whenever you're out of ammo. Not certain whether it'll work, though . . .