Firinneach Posted April 19, 2010 Share Posted April 19, 2010 I've been working on a mod to bring back companions from Origins to Vigil's Keep in Awakenings so that players can continue to interact (if not fight) with them. One of the biggest glitches I'm having however is that the characters are spawning at several locations across different maps, despite the fact that I'm specifying an area and coordinates in the script. Has anyone else had this problem or can anyone see what may be wrong with my script that this is happeing? Here is my script: #include "wrappers_h" void main() { object oPlayer = GetMainControlled(); object oMerchant = UT_GetNearestObjectByTag(oPlayer, "lelianatwo"); if (!IsObjectValid(oMerchant)) { object oArea = GetObjectByTag("vgk210ar_throne_room"); location lMerchantLocation = Location(oArea, Vector(-14.546064, -7.368423, -0.447728), -118.790512085); CreateObject(OBJECT_TYPE_CREATURE, R"lelianatwo.utc", lMerchantLocation); } } My created creature, "lelianatwo" spawns correctly in the throne room as specified, but I've also run into her now in at least two other places on different maps. But shouldn't the line: object oArea = GetObjectByTag("vgk210ar_throne_room");confine her to the throne room? Any help much appreciated. Link to comment Share on other sites More sharing options...
hdhd Posted April 19, 2010 Share Posted April 19, 2010 I would suggest to make a plot flag check at the beginning so that it spawned just once. But this is only a workaround. To do it properly follow this tutorial http://dragonagemodding.wordpress.com/2009/11/15/creating-a-custom-merchant-for-the-players-camp-part-1/ (especially the PRCSCR part)if (WR_GetPlotFlag(PLT_YOUR_PLOT, YOUR_FLAG) return; By the way you can use code boxes for scripts Link to comment Share on other sites More sharing options...
Recommended Posts