It'll be the respawn script.
Without looking at your script, it's hard to say exactly how to add it.
In general, here's what you need:
1: Lightshaft with a unique tag such as Abyss_Respawn
2: Unique area tag for the boss encounter
3: Altered re-spawn script.
Or, Funkies idea would need
1: Lightshaft with a unique tag
2: String set on the area and set to the custom tag of your respawn object
3: Altered respawn script
To alter the respawn script, you'll need to look through it and find where it jumps the player to the begining of the mod. I don't play single player often, but I doubt that's default engine behavior.
There should be existing code in the respawn script that already jumps the player.
You want to integrate your change with that part.
I'd do something like:
if (GetTag(GetArea(oPC)) != "CustomAreaTag")
{
//Normal code fires to jump them to the begining
}
else
{
//Custom Code to jump player to GetObjectByTag("Abyss_Respawn")
}
If you need more than that, you may need to post your re-spawn code.
Unless you're using the default scripts, but I don't recall them doing that.
Funky was suggesting using a variable on the area, which would define the string of the objects tag..
Set any unique variable on the area as a string and set it to the tag of your spawn point.
IE: string Custom_Spawn = Abyss_Respawn
So,
if (GetLocalstring(GetArea(oPC, "Custom_Spawn")) == "")
{
//Normal code fires to jump them to the begining
}
else
{
//Custom Code to jump player to GetObjectByTag(GetLocalString(GetArea(oPC), "Custom_Spawn"))
}
EDIT: I missread Funkies idea.
Modifié par wyldhunt1, 16 décembre 2011 - 09:43 .