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
[SOLVED]After 3 Area Collides, something should happen
Author Message
Viperdream Offline
Member

Posts: 124
Joined: Jan 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Pandemoneus Offline
Senior Member

Posts: 328
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Viperdream Offline
Member

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

It works now Smile

Thanks a lot!

03-13-2011 07:39 PM
Find all posts by this user Quote this message in a reply
Post Reply 




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