55 lines
1.8 KiB
Plaintext
55 lines
1.8 KiB
Plaintext
#include "x4_inc_functions"
|
|
void main()
|
|
{
|
|
object oPC = GetEnteringObject();
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
//::: Not needed due to PRC having this built in.
|
|
/* if (GetCampaignInt(CharacterDB(oPC), "PC_DEAD") == TRUE)
|
|
{
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(GetMaxHitPoints(oPC), DAMAGE_TYPE_POSITIVE), oPC);
|
|
DeleteCampaignVariable(CharacterDB(oPC), "PC_DEAD");
|
|
} */
|
|
|
|
int nHench;
|
|
object oHench;
|
|
object oTarget;
|
|
effect eVFX;
|
|
|
|
// Apply a visual effect.
|
|
eVFX = SupernaturalEffect(EffectVisualEffect(VFX_DUR_BLACKOUT));
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVFX, oPC, 2.0);
|
|
|
|
// Find the location to which to teleport.
|
|
oTarget = GetWaypointByTag("PC_START");
|
|
|
|
// Teleport the PC.
|
|
AssignCommand(oPC, ClearAllActions());
|
|
AssignCommand(oPC, JumpToObject(oTarget));
|
|
|
|
// Also teleport associates.
|
|
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
|
AssignCommand(oHench, ClearAllActions());
|
|
AssignCommand(oHench, JumpToObject(oTarget));
|
|
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
|
AssignCommand(oHench, ClearAllActions());
|
|
AssignCommand(oHench, JumpToObject(oTarget));
|
|
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
|
AssignCommand(oHench, ClearAllActions());
|
|
AssignCommand(oHench, JumpToObject(oTarget));
|
|
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
|
AssignCommand(oHench, ClearAllActions());
|
|
AssignCommand(oHench, JumpToObject(oTarget));
|
|
|
|
// Support for multiple henchmen (includes horses).
|
|
nHench = 1;
|
|
oHench = GetHenchman(oPC, 1);
|
|
while ( oHench != OBJECT_INVALID )
|
|
{
|
|
AssignCommand(oHench, ClearAllActions());
|
|
AssignCommand(oHench, JumpToObject(oTarget));
|
|
// Next henchman.
|
|
oHench = GetHenchman(oPC, ++nHench);
|
|
}
|
|
}
|