adding ammo to inventory

for a long time ive been able to save the amount of ammo I have for each weapon but not reload and set the ammo amount.

I have this in my game class.boltonsinv is my inventory class.


boltonsinv.AddAmmoToWeapon(44, class'boltons_crossbow_weapon');

I replaced the ammo int var with 44 just while trying to get it to work.

Bump on this.
By the way ,for saving/loading your ammo are you using the code that you showed me here

or is it another thing used for the ut ammo pick ups?

Take a look to see if you can find something useful in the code in this video.

im saving with another custom kismet node.

everything works fine,i play for a bit,pick up x amount of ammo and save the game.i load the game and the custom ammo var says what it should.i just cant get the weapon to take the new ammo var.
didn’t see anything in the vid on first scan but I will watch it again.thanks.

I hope you make it.(if you do please share the result for comparison).

Im right now trying to do the same thing using krushas kismets.More or less i did it but it have flaws.Im doing it using a ut weapon and basically what im doing is, I have a key button kismet (left mouse button)attached to a swith kismet node with 9 switches.(resembling 9 bullets).Every time I shoot, I make a save/overwrite of the int 0 that is below my switch node and it looks like its keeping a track on the thing but is not perfect.

got it.


function addsomeammo()
{
     local UTInventoryManager UTInvManager;

	UTInvManager = UTInventoryManager(InvManager);
	if (UTInvManager != None)
	{
		UTInvManager.AddAmmoToWeapon(44, class'boltons_crossbow_weapon');
	}

     `log(" work god dam it" );


}


function is in th pawn class triggered from the game class.

now to swap the 44 for the ammo var and set the other weapons up.happy days.