(10-06-2015, 08:09 PM)FlawlessHappiness Wrote: The last number in the AddEntityCollideCallback, int alStates.
AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates);
If you set it to 0, the callback calls both when entering and when leaving the area.
AddEntityCollideCallback("Player", "Area", "Function", false, 0);
In your function you would then do:
void Function(string &in asParent, string &in asChild, int alState)
{
if(alState == 1) //If entering
{
//Do stuff if entering
}
if(alState == -1) //If leaving
{
//Do stuff if leaving the area
}
}
Thanks!! Now this is solved, I tried it, and it worked, now I can upgrade more old scriptings haha.
But now about the music, is there something wrong with my snt file?! since it doesn't change from volumes or doesn't "fade" to a lower volume...