I've been trying to add my own items to my inventory upon start-up. I followed this tutorial and at first experienced success, but am now having trouble when I try to add more items in the same script. I was hoping that someone could take a look at what I have written and tell me if they see any errors...
SCRIPT:
#include "utility_h"
#include "plt_my_custom_plot"
void main()
{
if ( WR_GetPlotFlag( PLT_MY_CUSTOM_PLOT, MY_ITEM_CHECK_FLAG ) == TRUE )
return;
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
switch ( nEventType )
{
case EVENT_TYPE_MODULE_LOAD:
{
UT_AddItemToInventory(R"selietharmor.uti", 1);
UT_AddItemToInventory(R"seliethboots.uti", 1);
UT_AddItemToInventory(R"seliethgloves.uti", 1);
UT_AddItemToInventory(R"devotionshield.uti", 1);
UT_AddItemToInventory(R"devotionsword.uti", 1);
UT_AddItemToInventory(R"dragonsfang.uti", 2);
UT_AddItemToInventory(R"stenarmor.uti", 1);
UT_AddItemToInventory(R"stenboots.uti", 1);
UT_AddItemToInventory(R"stengloves.uti", 1);
UT_AddItemToInventory(R"stenhelm.uti", 1);
WR_SetPlotFlag( PLT_MY_CUSTOM_PLOT, MY_ITEM_CHECK_FLAG, TRUE );
break;
}
default:
break;
}
}
_______________END SCRIPT
The first 6 (selieth set, devotion set, and dragonsfang) items load in older saves but do not appear in newer and most recent saves. The "sten" item series does not appear at all. I have tried working around this, and saving the game without the content enabled and then enabling the content again to no avail. Any help would be appreciated!
Thanks
EDIT: If it makes any difference, in my palette window, all the items have their in-game names appearing next to them in parenthesis, but the "sten" items do not. I've compared everything between the items, and I haven't done anything differently with the new items than I did with the ones that appear in game...
Modifié par Odangou, 16 janvier 2011 - 10:31 .





Retour en haut






