Hey Guys, I've been asking a lot around here :P Because I'm trying to make a wayPoint based AI. I'm getting some nice results 'til now but I want to try other way of code this. I'm with this question since I start coding in C#. I want to know how can I execute something, like a function one time(not talking about void Start, of course) and then wait for another command to execute it again. Let's supose I have find a wayPoint and I first want to reach it to, then, search for another. A Simple print("Hello World"); within what I want is more than good. :D
Thanks from now! Sorry for any English mistakes, If you don't understand what I mean, I'll try to explain again.
asked Mar 02 '12 at 12:29 AM
I'd do it with some kind of callback. So, you have your function
(assuming that you have a type 'Waypoint' that represents a point that your AI should be approaching)
Then, where you have code that determines if the AI has reached its destination, use something like this: