Frictional Games Forum (read-only)

Full Version: [SOLVED]After 3 Area Collides, something should happen
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
But how do I do that? :<

I know I could add a value for every collide. But how do I add a value?

I'm stuck :<
Code:
void OnStart()
{
AddEntityCollideCallback("Player", "Area1", "TaDa", true, 1);
AddEntityCollideCallback("Player", "Area2", "TaDa", true, 1);
AddEntityCollideCallback("Player", "Area3", "TaDa", true, 1);
}

void TaDa(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("counter", 1);
if (GetLocalVarInt("counter") >= 3) {
// awesome stuff happens
}
}
It works now Smile

Thanks a lot!