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
creating lots of helpfull functions?
Deruu Offline
Junior Member

Posts: 6
Threads: 0
Joined: Sep 2010
Reputation: 0
#3
RE: creating lots of helpfull functions?

(09-18-2010, 09:51 AM)Luis Wrote: Nope, this wouldn't work, cos the AddEntityCollideCallback expects a collide callback function name only (meaning a function with 3 parameters - String parent_name, String child_name, int state_of_collision). You can always create a function that works just like an alias for that call, like:

AddEntityCollideCallback("Player", "AreaChairFly", "CollideWithAreaChairFly", false, 0);

...

void CollideWithAreaChairFly(String &in asParent, String &in asChild, int alState)
{
      AddPropImpulse("MyChair", 0.0, 7, 0.0, "world");
}

I do believe he wants anonymous functions, which would be very convenient. I'm not too familiar with AngelScript, but from what I could gather it doesn't seem to support anonymous functions.
09-18-2010, 10:14 AM
Website Find


Messages In This Thread
creating lots of helpfull functions? - by gosseyn - 09-18-2010, 07:57 AM
RE: creating lots of helpfull functions? - by Deruu - 09-18-2010, 10:14 AM



Users browsing this thread: 1 Guest(s)