Frictional Games Forum (read-only)

Full Version: Checkpoints - asName? Please help. :]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys, I'm having a really big problem with my checkpoints. It's something simple I am sure but I need to figure out what the asName... or internal name is. The part of the code in bold below is what I need to know how to name. I have tried putting in the start area name but to no avail, so I'm not really sure. I would greatly appreciate any help!

void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);

Thanks guys!
asName is the internal name for the checkpoint. You can make it anything you want and it is stored in the asName variable in the callback:
PHP Code:
void MyFunc(string &in asNameint alCount

For example, if you had two checkpoints calling the same function, one with the internal name "check01" and the other "check02", you could do something like this:
PHP Code:
void CheckPointFunc(string &in asNameint alCount)
{
    if(
asName == "check01") {
        
// do stuff
    
}

    if(
asName == "check02") {
        
// do different stuff
    
}

Um.. Isn't this thread suppose to be in development support section ?
Yeah - all callback parameters are passed in by the game when the appropriate event happens, so that you can make use of them, if you want - it's engine's way of providing you with additional information for the event. In the checkpoint callback function above asName identifies the checkpoint, while alCount tels you how many times the callback was called for that checkpoint (note that the count starts from 0).

(02-02-2013, 09:46 AM)No Author Wrote: [ -> ]Um.. Isn't this thread suppose to be in development support section ?
Yes it is, one of the moderators will probably move it.
Awesome, thanks for the help. My problem is finally fixed after way too long. Sorry for posting in the wrong section, first post you see.

Thanks again!