Doh after i read both posts i edited my system so instead of the waypoint being created through a different script in the system the module builder has to place the waypoint tagged respawnpoint and that is the bindpoint now
i just uploaded my system as is to nwvault but its pending approval right now
http://nwvault.ign.c....Detail&id=3805
Edit:
here is the current code for the related to Destination function in the include:
/*
Destination function notes:
this function is modular so you can add or remove respawn locations as you want to
remember tho if you remove all respawn locations you will break the player being able to respawn
unless you have at least one respawn location setup that you created and put into the function
i would suggest keeping the unmodified functions 4th respawn location even if you change the other ones
here is the order in which the respawn locations are in use assuming you have not customized this function
1. the nearest rez shrine if the player found any rez shrines in the area
2. the players set bind point if one is set
3. the modules default respawn point if the player does not have a set bind point
4. where the player died if the module does not have a default respawn point
*/
void Destination(object oRespawner)
{
//start the variables that can not be removed
int foundrezshrine;
int hasrezshrine;
object oArea = GetArea(oRespawner);
object oTemple = GetWaypointByTag("NW_DEATH_TEMPLE");
string sDestTag;
//end of variables that can not be removed
//start of rez shrine code that can be removed
if (GetLocalInt(oArea, "hasrezshrine")==1)//checks if the player found a rez shrine
{
if (GetLocalInt(oRespawner, "foundrezshrine")== 1)
{
//send them to the nearest one
string oShrine = "GetNearestObjectByTag(rezshrine)";
SetLocalString(oRespawner, "sDestTag", "oShrine");
}
}
//end of rez shrine code that can be removed
//if the player has not found the rez shrine or there are no rez shrines
if (GetLocalInt(oArea, "hasrezshrine") == 0) return TRUE;
if (GetLocalInt(oRespawner, "foundrezshrine")== 0)
{
string bindpoint = GetCampaignString("bindpointdatabase", "sBindPoint", oRespawner);
string bindpointdatabase;
string sBindPoint;
//start of bind point code that can be removed
if(GetCampaignString("bindpointdatabase", "sBindPoint", oPC) != "")
{SetLocalString(oRespawner, "sDestTag", "bindpoint");}
//end of bind point code that can be removed
// If no bind point was found or you are not using that feature
if(GetCampaignString("bindpointdatabase", "sBindPoint", oPC) == "") return TRUE;
//start of rez at module default location code that can be removed
if (GetIsObjectValid(oTemple)== TRUE)
{SetLocalString(oRespawner, "sDestTag", "NW_DEATH_TEMPLE");}
//end of rez at module default location code that can be removed
//if the module does not have a default respawn point
if (GetIsObjectValid(oTemple)!= TRUE) return TRUE;
SetLocalString(oRespawner, "sDestTag", "GetLocation(oRespawner)");//rez where you are
}
}
here is the code of the main script:
#include "respawn_include"
void main()
{
object oRespawner = GetLastRespawnButtonPresser();
Rez(oRespawner);//function that rezs player and figures out how much hp to heal them by
ApplyPenalty(oRespawner);//function that determines how gold and/or xp loss
Destination(oRespawner);//function that figures out where to send player upon respawn
string sTag = GetLocalString(oRespawner, "sDestTag");//sets the destination tag to a string
object oSpawnPoint = GetObjectByTag("sTag");
//send the player to the destination
AssignCommand(oRespawner,JumpToLocation(GetLocation(oSpawnPoint)));
}
Modifié par Ryuhi2000, 29 mars 2011 - 08:21 .