Frictional Games Forum (read-only)
How Can I Make a Trigger Activate Another Trigger? - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: How Can I Make a Trigger Activate Another Trigger? (/thread-4499.html)

Pages: 1 2


RE: How Can I Make a Trigger Activate Another Trigger? - Luis - 09-18-2010

(09-18-2010, 10:20 AM)Deruu Wrote:
Code:
void CollideGruntDoorTrigger1(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("GruntTrigger1", true);
    AddEntityCollideCallback("Player", "GruntTrigger1", "ReplaceMe", true, 1);
    
    SetEntityActive("CloseDoorTrigger1", true);
    AddEntityCollideCallback("Player", "CloseDoorTrigger1", "ReplaceMe", true, 1);
}

Ah true, you must set up the collide callback in order for the SetEntityActive to work. I just assumed that was already done Smile Thanks Deruu


RE: How Can I Make a Trigger Activate Another Trigger? - theDARKW0LF - 09-18-2010

Oh i see, that makes sense, thanks for all your responses, guys! I'll see if it works


RE: How Can I Make a Trigger Activate Another Trigger? - Pandemoneus - 09-18-2010

I think it's easier when you put the trigger areas active in the editor and just do
Code:
void CollideGruntDoorTrigger1(string &in asParent, string &in asChild, int alState)
{
    AddEntityCollideCallback("Player", "GruntTrigger1", "ReplaceMe", true, 1);
    AddEntityCollideCallback("Player", "CloseDoorTrigger1", "ReplaceMe", true, 1);
}

Just make sure you do not put those two AddEntityCollideCallbacks in OnStart()


RE: How Can I Make a Trigger Activate Another Trigger? - theDARKW0LF - 09-18-2010

(09-18-2010, 11:05 PM)Pandemoneus Wrote: I think it's easier when you put the trigger areas active in the editor and just do
Code:
void CollideGruntDoorTrigger1(string &in asParent, string &in asChild, int alState)
{
    AddEntityCollideCallback("Player", "GruntTrigger1", "ReplaceMe", true, 1);
    AddEntityCollideCallback("Player", "CloseDoorTrigger1", "ReplaceMe", true, 1);
}

Just make sure you do not put those two AddEntityCollideCallbacks in OnStart()

That makes even more sense, I'll do that, thanks!