NLinker

bwapi-c release 0.4

Jul 19th, 2017
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!

This release comes with three features: OpenBW support, issueCommand and registerEvent.

Starting from this release BWAPI-C comes with OpenBW libraries, thus the library and the examples support both OpenBW and original Starcraft: Brood War :rocket:

RegisterEvent can be used to emulate events, hence to relax the dependencies between different parts of the program.
The feature is applicable to 6 object types, and prefixed correspondingly:

  • Bullet_registerEvent
  • Force_registerEvent
  • Game_registerEvent
  • Player_registerEvent
  • Region_registerEvent
  • Unit_registerEvent

The example can be found, as usual, in example DLL:

    if (frame_count == 150) {
        // registerEvent test
        Game_registerEvent(Broodwar, &registerEventHandler, NULL, 10, 0);
    }

Here the function registerEventHandler is called 10 frames starting from frame 150.

The function issueCommand can be used to issue the same command, (e.g. move) to the group of units. It is equivalent to looping over a collection of units, however it is more convenient to use issueCommand for this purpose.

Add Comment
Please, Sign In to add comment