[thread bump in disguise]
I took a look at RoboCode today. They have a pretty
interesting concept I want to borrow. Here's an example:
package man;
import robocode.*;
public class MyFirstRobot extends Robot
{
public void run() {
while (true) {
ahead(100);
turnGunRight(360);
back(100);
turnGunRight(360);
}
}
public void onScannedRobot(ScannedRobotEvent e) {
fire(1);
}
}
Since my plugin isn't supposed to be biased towards shooting games,
I'd like to make the ability of adding your own commands. BUT to do
this, I need to get the function pointer for the command's code. This
is easy in C++, but is there any way of doing this in DBP? I need
to call a DBP function from the plugin. If there is a way (please
tell me!!!), I'm thinking of doing something like this:
test.dbp:
add command "walk", (walk_function)
...
FUNCTION walk_function()
do stuff...
endfunction
test.uai:
walk(100)
This would call the function above.
Also, I want to make what I call "Binding", where an AI program gets
"connected" to a certain object. The above "walk" command would make
the object walk folward automatically.
[/thread bump in disguise]