Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How Can I Make a Trigger Activate Another Trigger?
Author Message
Luis Offline
Frictional Games

Posts: 276
Joined: Jun 2006
Reputation: 9
Post: #11
RE: How Can I Make a Trigger Activate Another Trigger?

(09-18-2010 10:20 AM)Deruu Wrote:  
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

EOF
09-18-2010 11:41 AM
Find all posts by this user Quote this message in a reply
theDARKW0LF Offline
Member

Posts: 150
Joined: Sep 2010
Reputation: 0
Post: #12
RE: How Can I Make a Trigger Activate Another Trigger?

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

Check out my custom stories(1)(2)!
09-18-2010 08:49 PM
Find all posts by this user Quote this message in a reply
Pandemoneus Offline
Senior Member

Posts: 328
Joined: Sep 2010
Reputation: 0
Post: #13
RE: How Can I Make a Trigger Activate Another Trigger?

I think it's easier when you put the trigger areas active in the editor and just do
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()

09-18-2010 11:05 PM
Find all posts by this user Quote this message in a reply
theDARKW0LF Offline
Member

Posts: 150
Joined: Sep 2010
Reputation: 0
Post: #14
RE: How Can I Make a Trigger Activate Another Trigger?

(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
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!

Check out my custom stories(1)(2)!
09-18-2010 11:18 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)