Your exactly right Lightfoot8 ....Found it ! lol where I ( // ) makes it work
//void Reset(object oWaypoint)
//{
//DeleteLocalObject(OBJECT_SELF, "5001");
// DeleteLocalObject(OBJECT_SELF, "5002");
// DeleteLocalObject(OBJECT_SELF, "5003");
// SetCustomToken(5001, "Empty");
// SetCustomToken(5002, "Empty");
// SetCustomToken(5003, "Empty");
// DestroyObject(oWaypoint);
// DelayCommand(3.0, ExecuteScript("rune_resave", OBJECT_SELF));
//}
void OpenPortal(object oPC, object oWaypoint, location lPortal, location lDestination)
{
object oPortal = CreateObject(OBJECT_TYPE_PLACEABLE, "rune_gate", lPortal, FALSE);
DelayCommand(1.0, SetLocalLocation(oPortal, "Destination", lDestination));
PlaySound ("as_mg_telepin1");
DelayCommand(1.0, SetLocalObject(oPortal, "Creator", oPC));
// DelayCommand(3.0, Reset(oWaypoint));
DelayCommand(300.0, DestroyObject(oPortal));
}
void main()
{
object oPC = GetPCSpeaker();
object oWaypoint = GetLocalObject(OBJECT_SELF, "5001");
location lPortal = GetItemActivatedTargetLocation();
location lDestination = GetLocation(oWaypoint);
//effect eEffect = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2);
PlaySound("sco_mehedelec01");
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect, lPortal);
DelayCommand(2.0, OpenPortal(oPC, oWaypoint, lPortal, lDestination));
}
Modifié par Knight_Shield, 25 juillet 2011 - 11:23 .