Jump to content

Recommended Posts

Posted

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...