Why not just store a LocalLocation and the TagOf the Area.
object oPlayer = OBJECT_SELF;
location lPlayer = GetLocation(oPlayer);
string sAreaTag = GetTag(GetArea(oPlayer));
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(925), oPlayer, 0.0);
object oJewel = CreateItemOnObject("starjewel", oPlayer);
SetLocalLocation( oJewel,"JewelLoc",lPlayer);
SetLocalString ( oJewel,"JewelArea",sAreaTag);
SetCutsceneMode(oPlayer, TRUE);
DelayCommand(4.0, SetCutsceneMode(oPlayer, FALSE));
then to rebuild you location to make sure the area is correct would look something like this.
location lLoc = GetLocalLocation( oJewel,"JewelLoc");
string sAreaTag =GetLocalString ( oJewel,"JewelArea");
lLoc = Location(GetObjectByTag(sAreaTag),
GetPositionFromLocation( lLoc),
GetFacingFromLocation( lLoc)
);
Modifié par Lightfoot8, 08 juin 2011 - 09:11 .