2025/09/05 Update
Fixed random hang at log on for single player. Fixed class title function in Markshire Nomenclature script. Fixed faction melee that ensued if player was killed by defender faction in town. Updated most humanoids to use new class title function. Full compile.
This commit is contained in:
@@ -1,29 +1,46 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetEnteringObject();
|
||||
object oPC;
|
||||
object oSpawnPoint;
|
||||
string sDestTag;
|
||||
|
||||
if (GetIsPC(oPC))
|
||||
{
|
||||
string sDestTag = GetLocalString(oPC, "Respawn");
|
||||
if (sDestTag == "")
|
||||
{
|
||||
sDestTag = "en3_respawning";
|
||||
}
|
||||
oPC = GetEnteringObject();
|
||||
|
||||
object oSpawnPoint = GetObjectByTag(sDestTag);
|
||||
//SendMessageToPC(oPC,"en3_respawn2 >> entering.");
|
||||
|
||||
if (GetIsPC(oPC))
|
||||
{
|
||||
//SendMessageToPC(oPC,"en3_respawn2 >> PC found.");
|
||||
|
||||
sDestTag = GetLocalString(oPC,"Respawn");
|
||||
|
||||
if (sDestTag == "")
|
||||
{
|
||||
//SendMessageToPC(oPC,"en3_respawn2 >> Destination variable was unset, setting.");
|
||||
SetLocalString(oPC, "Respawn", "EN4_Respawn");
|
||||
}
|
||||
|
||||
//SendMessageToPC(oPC,"en3_respawn2 >> Destination tag is: "+sDestTag+".");
|
||||
|
||||
oSpawnPoint = GetWaypointByTag(sDestTag);
|
||||
|
||||
if (GetIsObjectValid(oSpawnPoint))
|
||||
{
|
||||
AssignCommand(oPC, JumpToLocation(GetLocation(oSpawnPoint)));
|
||||
//SendMessageToPC(oPC,"en3_respawn2 >> Destination is valid, jumping.");
|
||||
// Teleport the PC.
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
DelayCommand(0.3f,AssignCommand(oPC,JumpToObject(oSpawnPoint)));
|
||||
}
|
||||
else
|
||||
{
|
||||
// optional debug
|
||||
FloatingTextStringOnCreature("Invalid spawn point: " + sDestTag, oPC);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* void main()
|
||||
{
|
||||
object oPC;
|
||||
|
Reference in New Issue
Block a user