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é 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.





Retour en haut






