Data Realms Fan Forums
http://45.55.195.193/

MovableMan:GetClosestActor
http://45.55.195.193/viewtopic.php?f=73&t=14330
Page 1 of 1

Author:  piipu [ Sat Apr 18, 2009 8:29 am ]
Post subject:  MovableMan:GetClosestActor

I'm a bit confused by the syntax of this function. CC says the arguments should be
Code:
MovableMan:GetClosestActor(Vector2, number, custom [float]2, const Actor*)

Could someone explain what exatcly are these arguments?

Author:  mail2345 [ Sat Apr 18, 2009 9:21 am ]
Post subject:  Re: MovableMan:GetClosestActor

1. Is a location
2. Not sure, might be range. It's a number.
3. Same as 2. It's a decimal number.
4. That's a pointer to an actor.

I'm sure about 1,2,3 but lua doesn't have pointers.
Must be a mistake in the documentation/bindings.

Author:  piipu [ Sat Apr 18, 2009 2:27 pm ]
Post subject:  Re: MovableMan:GetClosestActor

What I meant was how to use this function. Knowing what datatypes the arguments are really doesn't help that much.

Author:  Roon3 [ Sat Apr 18, 2009 4:00 pm ]
Post subject:  Re: MovableMan:GetClosestActor

Do you mean like this:
Code:
Bob = MovableMan:GetClosestActor(*Numbers*)
Bob.GibThis -- Or something like that

Author:  piipu [ Sat Apr 18, 2009 7:06 pm ]
Post subject:  Re: MovableMan:GetClosestActor

Yes, that's what I'm looking for.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/