|
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.
(comments are locked)
|
|
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: That first function should be 'void OnReachedWaypoint', sorry. There's a rather frustrating Qato bug going around right now that stops edits from showing up.
Mar 02 '12 at 12:37 AM
syclamoth
Got it! I guess I'll can get some updates with the code now. :D Thanks for the (fast) reply!
Mar 02 '12 at 12:50 AM
GutoThomas
(comments are locked)
|
