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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED]After 3 Area Collides, something should happen
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#1
[SOLVED]After 3 Area Collides, something should happen

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 :<

(This post was last modified: 03-13-2011, 07:39 PM by Viperdream.)
03-13-2011, 06:30 PM
Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#2
RE: After 3 Area Collides, something should happen

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
}
}

03-13-2011, 07:18 PM
Find
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#3
RE: After 3 Area Collides, something should happen

It works now Smile

Thanks a lot!

03-13-2011, 07:39 PM
Find




Users browsing this thread: 1 Guest(s)