02-01-2011, 11:56 PM
02-02-2011, 12:05 AM
Tried to use CheckPoints?
02-02-2011, 12:09 AM
Not sure how to use them, I looked at the game scripting, but its too complicated.
02-02-2011, 12:56 AM
You can place a PlayerStart_Area and make it current checkpoint via functions. Place another one and make it current after a specific happening.
02-02-2011, 02:08 AM
Problem is, I don't know the scripting to do that. Anyone the scripting?
02-02-2011, 06:02 AM
(02-02-2011, 02:08 AM)Crunchygoblin Wrote: [ -> ]Problem is, I don't know the scripting to do that. Anyone the scripting?
Here's the code lifted from "16_cistern_entrance.hps" (with the movable ladder):
Code:
/////////////////////////
//Upstairs checkpoint when completing ladder
void CollideAreaPlayerUp(string &in asParent, string &in asChild, int alState)
{
CheckPoint("cp_up", "PlayerStartArea_2", "", "Hints", "DeathFall");
}
And here's the syntax with explanations:
Code:
void CheckPoint(string& asName,string& asStartPos ,string& asCallback, string &asDeathHintCat, string &asDeathHintEntry);
CheckPoint = This function.
string &asName = Checkpoint's name ("cp_up" in the example).
string &asStartPos = New start position ("PlayerStartArea_2" in the example).
string &asCallback = A function to be called when the checkpoint loads (for death counts, used to give more explicit or obvious hints when players are struggling - not used in example).
string &asDeathHintCat = Category name of the death hint that will be shown before player respawns at new checkpoint ("Hints" in the example).
string &asDeathHintEntry = Entry name of the death hint that will be shown before player respawns at new checkpoint ("DeathFall" in the example).
The function mentioned in "string &asCallback" must be given the following syntax to work:
Code:
void MyFunc(string &in asName, int alCount)
MyFunc = Function name. Change this to whatever you want.
string &in asName = The name of the death counter for this checkpoint.
int alCount = An integer (whole number, i.e. 1, 2, 3...) apparently representing the number of times the player has respawned at this checkpoint. It will be set to 0 upon first respawn, and increments by 1 thereafter.