Yep, an AddEntityCollideCallback is what you want:
AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates);
Callback syntax: void MyFunc(string &in asParent, string &in asChild, int alState)
asParentName - internal name of main object
asChildName - internal name of object that collides with main object (asterix (*) NOT supported!)
asFunction - function to call
abDeleteOnCollide - determines whether the callback after it was called
alStates - 1 = only enter, -1 = only leave, 0 = both
So based on this, we can make one.
The parent is the Player, so we use "Player".
The child is what the Player collides with, so the name of your Script Area.
The function is the name of the function. For now, let's call it IntroFunc.
We delete on collide because this happens once, so True.
It happens when we enter, so the alState will be 1.
Thus, we put this information into OnStart() in our hps file.
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea", "IntroFunc", true, 1);
}
And the Function name will be IntroFunc, which we also apply to our Callback Syntax (see the code snippet above). Then we get this:
void IntroFunc(string &in asParent, string &in asChild, int alState)
{
//Intro script
}
And that's it! Just put whatever you want to happen in the intro between the Braces of the IntroFunc.
Thus, we get a code block which looks like this:
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea", "IntroFunc", true, 1);
}
void IntroFunc(string &in asParent, string &in asChild, int alState)
{
//Intro script
}
Just make sure the "ScriptArea" line in the AddEntityCollideCallback matches your Script Area name which you have defined in the Level Editor!