Frictional Games Forum (read-only)

Full Version: Scripting used to make a checkpoint?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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);
(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");


(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.

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.
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)

(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?

(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
}
(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