hey guys having a problem adding some equipment in game, i ran through some tutorials about addeding a sword adn shield and that worked fine.
I have gone to make my own set of armor and followed the same basic rules. The new pack shows up under DLC but does not show up in game.
The following is the script i use. Is thereanything wrong with it or is it somthing else?
Thanks in advance
Mike
*****************************************************************************************************************************
// ---- SCRIPT STARTS HERE ----
// Later on in this script, we will use the UT_AddItemToInventory()
// function to add an item to the player's inventory.
// But before we could use it, we have to tell the toolset where
// to look for it. The function is in the "utility_h" script file
// under _Core Includes, we will include this file at the top of
// our script file, above the main function.
#include "utility_h"
#include "plt_my_custom_plot2"
void main()
{
// If our plot flag is set to TRUE, that means we have already
// given the items to the player, there is no need to continue
// running this script.
if ( WR_GetPlotFlag( PLT_MY_CUSTOM_PLOT2, MY_ITEM_CHECK_FLAG ) == TRUE )
return;
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
// We will watch for every event type and if the one we need
// appears we will handle it as a special case. We will ignore the rest
// of the events
switch ( nEventType )
{
// This event happenes every time the module loads
// This usually happenes when creating a new game
// or loading a savegame
case EVENT_TYPE_MODULE_LOAD:
{
// The UT_AddItemToInventory function adds various resources to a
// creature's inventory. Here we add one weapon and one shield.
UT_AddItemToInventory(R"my_battle_chest.uti", 1);
UT_AddItemToInventory(R"my_battle_gloves.uti", 1);
UT_AddItemToInventory(R"my_battle_boots.uti", 1);
// Set our plot flag to TRUE, so the next time this script tries
// to run it will not add extra items to the player's inventory
WR_SetPlotFlag( PLT_MY_CUSTOM_PLOT2, MY_ITEM_CHECK_FLAG, TRUE );
// We have dealt with the event we were waiting for.
// At this point we can stop looking for other events
break;
}
default:
break;
}
}
// ---- SCRIPT ENDS HERE ----
***************************************************************************************************************************
need some help :)
Débuté par
mks2005
, déc. 11 2009 05:29
#1
Posté 11 décembre 2009 - 05:29
#2
Posté 11 décembre 2009 - 08:45
There is always the random chance that you have someone else's addin installed that uses the same plot name you did (since you didn't actually customize it). Another thing to double check is if everything exported properly, including the items.
#3
Posté 13 décembre 2009 - 10:03
Hi yes I Have made sure the plot name is different, i did miss that to start but it would bring up an error saying it was already being used. Plus the only addons im using at the moment are my own.
I also dont get any errors during the export process, I am probally missing somthing really easy.
Think ill double check everything again...
Thanks
I also dont get any errors during the export process, I am probally missing somthing really easy.
Think ill double check everything again...
Thanks
#4
Posté 13 décembre 2009 - 10:44
Also make sure you are clearing out override directories.
#5
Posté 13 décembre 2009 - 01:13
thanks for all the help guys i figured it out, was my own stupid fault left the my_ in front of the item names but i was not using that so it was looking for items that did not exist but it did not bring up an error when exporting or anything.





Retour en haut






