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
How can I call a callback multiple times?
Magasztos Offline
Member

Posts: 54
Threads: 21
Joined: Jun 2012
Reputation: 0
#1
How can I call a callback multiple times?

This might be a really stupid question but I made a key to "lock & Unlock" a door (Active/non-active) but I can only do this once, so if this is possible



How can I call a callback multiple times?





(And I mean without copying it like 100x :p)

~The Hulk is always greener on the other side~
(This post was last modified: 07-12-2012, 03:31 PM by Magasztos.)
07-12-2012, 02:36 PM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#2
RE: How can I call a callback multiple times?

Put a AddEntityCollideCallback or ItemCallback depending on what you want to do in the function you're calling.

e.g.

void OnStart
{
    AddEntityCollideCallback("Player", "AreaTest", "CollideTest", true, 1);
}

void CollideTest(string &in asParent, string &in asChild)
{
   AddEntityCollideCallback("Player", "AreaTest", "CollideTest", true, 1);
}
I think you got the idea now.

[Image: 18694.png]
07-12-2012, 02:55 PM
Find
Magasztos Offline
Member

Posts: 54
Threads: 21
Joined: Jun 2012
Reputation: 0
#3
RE: How can I call a callback multiple times?

(07-12-2012, 02:55 PM)Ongka Wrote: Put a AddEntityCollideCallback or ItemCallback depending on what you want to do in the function you're calling.



e.g.



void OnStart

{

    AddEntityCollideCallback("Player", "AreaTest", "CollideTest", true, 1);

}



void CollideTest(string &in asParent, string &in asChild)

{

   AddEntityCollideCallback("Player", "AreaTest", "CollideTest", true, 1);

}

I think you got the idea now.




That's really clever :p
Thanks alot.

-Imre

~The Hulk is always greener on the other side~
07-12-2012, 02:57 PM
Find




Users browsing this thread: 1 Guest(s)