diff --git a/scripts/ai/API b/scripts/ai/API index c074910..787e107 100644 --- a/scripts/ai/API +++ b/scripts/ai/API @@ -129,7 +129,7 @@ shoot([number weapon]) -- return nil. getenemy() - -- return the id of the nearest enemy. + -- return the id of the nearest enemy or -1 if none is found. // ================ // TIMERS! @@ -156,11 +156,17 @@ createvect(number x, number y) -- y coord of the vector. -- return pointer to the Vec2 -say(string message) - -- Make the pilot say something to the player. +comm(number id, string message) + -- Make the pilot say something to the pilot of id. + -- id - of the pilot to speak to. -- message - string to output. -- return nil +broadcast(string message) + -- Make the pilot broadcast a message to everyone in the system. + -- message - string to say to everyone in the system. + -- return nil + rng(number low, number high) -- Return a random number between low and high. -- low - minimum to return.