22 lines
1005 B
Plaintext
22 lines
1005 B
Plaintext
void main()
|
|
{
|
|
object oPC = GetLastUsedBy();
|
|
if (!IsInConversation(oPC))
|
|
{
|
|
if (GetLocalInt(OBJECT_SELF, "iActivated") == 1)
|
|
{
|
|
PlaySound("as_mg_telepin1");
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect (VFX_FNF_SOUND_BURST), oPC);
|
|
object oLandGateDest = GetObjectByTag(GetLocalString(OBJECT_SELF, "CurrentDest"));
|
|
AssignCommand(oPC, DelayCommand(1.0, JumpToObject(GetNearestObjectByTag("LandGatePortal", oLandGateDest, 1))));
|
|
AssignCommand(OBJECT_SELF, DelayCommand(20.0, PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
|
|
AssignCommand(OBJECT_SELF, DelayCommand(20.5, SetLocalInt(OBJECT_SELF, "iActivated", 0)));
|
|
SetLocalString(oPC, "DialValue1", "");
|
|
SetLocalString(oPC, "DialValue2", "");
|
|
SetLocalString(oPC, "DialValue3", "");
|
|
}
|
|
else
|
|
AssignCommand(GetLastUsedBy(), SpeakString("The LandGate is not yet activated"));
|
|
}
|
|
}
|