int iCountItems = UT_CountItemInInventory(R"longsword_norequirements.utp");
UT_RemoveItemFromInventory(R"longsword_norequirements.utp", iCountItems);
WR_SetPlotFlag(PLT_SWORDS_AND_ARMOR, ONE_SWORD, FALSE);
WR_SetPlotFlag(PLT_SWORDS_AND_ARMOR, MORE_SWORDS, FALSE);
UT_AddItemToInventory(R"longsword_norequirements.utp", iCountItems, GetObjectByTag("sword_armor_chest_prelude"));
or to be more specific: the removal of items from the player inventory works but adding the same amount of items to sword_armor_chest_prelude does not work. I have it on the map.
why is this not working?
Débuté par
gordonbrown82
, oct. 04 2010 06:16
#1
Posté 04 octobre 2010 - 06:16
#2
Posté 04 octobre 2010 - 08:27
I don't even know how this is working for the PC since items are suffixed with .uti. .utp is for placeables.
#3
Posté 05 octobre 2010 - 06:47
Indeed, .uti should work.
You'll probably find that an equipped instance of the sword is not regarded as inventory. That's certainly true of other inventory functions. If that's the case, you'll need to unequip it first (bearing in mind that there are two weapon sets).
You'll probably find that an equipped instance of the sword is not regarded as inventory. That's certainly true of other inventory functions. If that's the case, you'll need to unequip it first (bearing in mind that there are two weapon sets).
#4
Posté 05 octobre 2010 - 05:23
TimelordDC wrote...
I don't even know how this is working for the PC since items are suffixed with .uti. .utp is for placeables.
#5
Posté 05 octobre 2010 - 11:08
The reason it removes but doesn't add is that the remove function converts the resource name into a tag by cutting off the suffix at the end. In this case, that's hiding the bug. The add function needs the resource and not the tag, so it can't chop off the suffix.
#6
Posté 06 octobre 2010 - 12:46
hmm i thought i had gone temporarily insane. or more insane than usual.





Retour en haut






