Frictional Games Forum (read-only)
[REQUEST] Checkpoints - asName? Please help. :] - 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)
+--- Thread: [REQUEST] Checkpoints - asName? Please help. :] (/thread-20141.html)



Checkpoints - asName? Please help. :] - LowKeeee - 02-02-2013

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!


RE: Checkpoints - asName? Please help. :] - NaxEla - 02-02-2013

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
    
}




RE: Checkpoints - asName? Please help. :] - No Author - 02-02-2013

Um.. Isn't this thread suppose to be in development support section ?


RE: Checkpoints - asName? Please help. :] - TheGreatCthulhu - 02-02-2013

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.


RE: Checkpoints - asName? Please help. :] - LowKeeee - 02-02-2013

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!