Question/Suggestion: Calling script from plugins.

Started by lemmy101, Wed 22/03/2006 11:27:30

Previous topic - Next topic

lemmy101

Hi all,

We're currently writing a plug-in, along with an editor, that we want users of which to be able to write in bits of AGS script into flowchart nodes, which will then be run by the game engine. I've found two functions in the engine interface relating to calling scripts in-game:

int CallGameScriptFunction(const char *name, int globalScript,
                int numArgs, int arg1 = 0, int arg2 = 0, int arg3 = 0);

void* GetScriptFunctionAddress (const char *funcName);

The first I'm guessing is only for my own functions, the second obtaining an address to an AGS script function for me to call.

I was wondering if, either directly or indirectly, there was any way for me to pass a string buffer of actual script for the engine to run, or is this impossible due to internal compilation of the script or something?

Something line:

char szBuf[] = "cEgo.Walk(oBeachWaypoint.X, oBeachWaypoint.Y, eNoBlock, eWalkableAreas); cDoctor.Walk(oBeachWaypoint.X-30, oBeachWaypoint.Y, eNoBlock, eWalkableAreas);";

If this is not currently possible, is it something that is likely never going to be due to internal workings?

thanks!

lemmy

Pumaman

The game engine does not include the script compiler - it is unable to compile any scripts, it can only run the compiled byte-code that the editor produces. This is unlikely to change in the future.

Kweepa

Still waiting for Purity of the Surf II

lemmy101

Quote from: Pumaman on Wed 22/03/2006 18:18:30
The game engine does not include the script compiler - it is unable to compile any scripts, it can only run the compiled byte-code that the editor produces. This is unlikely to change in the future.


Ok cheers Pumaman, I kind of expected that would be the case, I guess I could make my own functions to route through instead. It would have been nice, but not totally necessary for what we need to do.

Thanks again!

Lemmy

SMF spam blocked by CleanTalk