Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting new spawn point?
Phoroneus Offline
Member

Posts: 141
Threads: 12
Joined: Feb 2011
Reputation: 0
#6
RE: Setting new spawn point?

(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):
/////////////////////////
//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:
void  CheckPoint(string& asName,string& asStartPos ,string& asCallback, string &asDeathHintCat, string &asDeathHintEntry);
void = Use this only if "CheckPoint" is the callback name and the function is not called within some other function, otherwise delete it (as you can see, it is gone in the example).
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:
void MyFunc(string &in asName, int alCount)
Where:
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.

[Image: at_9365860.png]

Follow Harvest.
02-02-2011, 06:02 AM
Find


Messages In This Thread
Setting new spawn point? - by Crunchygoblin - 02-01-2011, 11:56 PM
RE: Setting new spawn point? - by Tanshaydar - 02-02-2011, 12:05 AM
RE: Setting new spawn point? - by Crunchygoblin - 02-02-2011, 12:09 AM
RE: Setting new spawn point? - by Tanshaydar - 02-02-2011, 12:56 AM
RE: Setting new spawn point? - by Crunchygoblin - 02-02-2011, 02:08 AM
RE: Setting new spawn point? - by Phoroneus - 02-02-2011, 06:02 AM



Users browsing this thread: 1 Guest(s)