Each function has a unique name used by the script such as
"Get Distance"
I have an array of structures containing a function name and an enumeration
{
...
"Get Distance", GET_DISTANCE
...
}
where
enum
{
...
GET_DISTANCE,
...
}FUNCTIONS;
and another array containing functions in the same order
function *function[] =
{
...
GetDistance,
...
}
The way I hold all of the functions in a single array is by making them all of type
void* function (void*)
and casting data inside the function.
This only allows up to one parameter for a function (you can, however, also pass arrays or linked lists) but for the game I'm working on this seems to be possible remembering these are only for the condition/action functions and that the functions can get access to member variables of the NPC's anyway.
Hope this has helped, else please ask again .