Frictional Games Forum (read-only)
Scripting used to make a checkpoint? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Scripting used to make a checkpoint? (/thread-11505.html)



Scripting used to make a checkpoint? - FreshKorruption - 11-26-2011

I know that it is like this, but what do i fill them in with. Can i get an example?
void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);



RE: Scripting used to make a checkpoint? - Statyk - 11-26-2011

(11-26-2011, 01:59 AM)FreshKorruption Wrote: I know that it is like this, but what do i fill them in with. Can i get an example?
void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
**This should be in the Support section**

CheckPoint("", "SPAWNAREANAME", "", "", "");

Lol It can be that naked. To fill in:

CheckPoint("Checkpointname", "SPAWNAREANAME", "", "DeathHintCategory", "DeathHintEntry");





RE: Scripting used to make a checkpoint? - FreshKorruption - 11-26-2011

(11-26-2011, 02:02 AM)Statyk Wrote:
(11-26-2011, 01:59 AM)FreshKorruption Wrote: I know that it is like this, but what do i fill them in with. Can i get an example?
void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
**This should be in the Support section**

CheckPoint("", "SPAWNAREANAME", "", "", "");

Lol It can be that naked. To fill in:

CheckPoint("Checkpointname", "SPAWNAREANAME", "", "DeathHintCategory", "DeathHintEntry");
What i'm confused about is how there is the usual void onstart and you put stuff in there (like a nickname and stuff) and than you have void (nickname). What do you put in each individual one? Hope you understood that.




RE: Scripting used to make a checkpoint? - Linus Ă…gren - 11-26-2011

I put it in a collidebox or event at a place where it's possible for a player to die, so that you will respawn on the checkpoint after death.


RE: Scripting used to make a checkpoint? - flamez3 - 11-26-2011

You put this in the void Onstart
CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
And you do this for the callback
void MyFunc(string &in asName, int alCount)




RE: Scripting used to make a checkpoint? - FreshKorruption - 11-26-2011

(11-26-2011, 03:33 AM)flamez3 Wrote: You put this in the void Onstart
CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
And you do this for the callback
void MyFunc(string &in asName, int alCount)
Thanks. Im still a lil rusty though =/ So what would i put in thhe int alCount and string &in asName?




RE: Scripting used to make a checkpoint? - Statyk - 11-26-2011

(11-26-2011, 05:00 AM)FreshKorruption Wrote: Thanks. Im still a lil rusty though =/ So what would i put in thhe int alCount and string &in asName?
Lol definitely a little rusty... =P You don't put anything there. here's an example:

//_________________
void OnStart();
{
CheckPoint("", "SPAWNAREANAME", "CALLBACKFUNC", "", "");
}

void CALLBACKFUNC(string &in asName, int alCount)
{
//your scripts here. =P
}


RE: Scripting used to make a checkpoint? - FreshKorruption - 12-01-2011

(11-26-2011, 05:26 AM)Statyk Wrote:
(11-26-2011, 05:00 AM)FreshKorruption Wrote: Thanks. Im still a lil rusty though =/ So what would i put in thhe int alCount and string &in asName?
Lol definitely a little rusty... =P You don't put anything there. here's an example:

//_________________
void OnStart();
{
CheckPoint("", "SPAWNAREANAME", "CALLBACKFUNC", "", "");
}

void CALLBACKFUNC(string &in asName, int alCount)
{
//your scripts here. =P
}
Thanks. Gave you some reputation for helping =D