Would it be possible to place game graphics at at a certain location? For example a flag? Or even an image from outside.
Inserting graphics onto the map (or overlaid like the text overlay) is something we might add eventually, but probably not in this release. It would certainly allow some cool stuff
Also, a possibility to format text a little more would be nice. For example center it, or increase size.
Changing font size is not possible with KaM's bitmap fonts, but we could allow changing alignment (center/left/right) and moving it to a different place on the screen. We could also allow you to choose which KaM font you use.
Another one: ObjectInArea. Whether it is a unit or building, I'd like to be able to have a state that checks if something is in a certain spot.
Do you mean "is this unit within this area?" (you provide UnitID and area, true/false result) or "give me a unit within this area" (you provide area, it gives you unit ID). The first you can write yourself as a function, like this:
- Code:
function UnitInArea(aUnitID, Left, Top, Right, Bottom: Integer): Boolean;
begin
Result := (States.UnitX(aUnitID) >= Left) and (States.UnitX(aUnitID) <= Right) and (States.UnitY(aUnitID) >= Top) and (States.UnitY(aUnitID) <= Bottom);
end;
Put that function at the top of your script, then you can do something like this:
"if UnitInArea(MyUnit, 10, 10, 20, 20) then"
where MyUnit is a variable storing a unit you created or found earlier (with Actions.GiveUnit or States.UnitAt or OnUnitTrained or something)
We're planning to add GetClosestUnit(Player, X, Y) (and same for house/group) eventually, which covers you other case.