Search found 2 matches

by ZerGreenOne
Sun Sep 18, 2016 9:11 am
Forum: AI development (BWAPI Bots)
Topic: How to use Custom UnitFilters? (C++ dll)
Replies: 1
Views: 382

Re: How to use Custom UnitFilters? (C++ dll)

Actually, nevermind, apparently you have to create a function that returns bool and has an argument of type Unit, and then create a variable of type UnitFilter and set it to be equal to that function.
by ZerGreenOne
Sat Sep 17, 2016 10:21 pm
Forum: AI development (BWAPI Bots)
Topic: How to use Custom UnitFilters? (C++ dll)
Replies: 1
Views: 382

How to use Custom UnitFilters? (C++ dll)

Suppose I have an unordered_map that takes units and maps them to integers. I have a unit u. How can I use u->GetClosestUnit() to get the closest unit that is mapped to a certain value via an unordered_map? GetClosestUnit takes a value of type UnitFilter (Which is an alias of UnaryFilter<Unit>), so ...

Go to advanced search