I feel like I've missed something fundamental in the usage of the FogOfWarAPI in combat. I'm trying to reveal the area around a battle objective, and while it appears to be doing so, it isn't showing any ships or entities within that area.
The setup is based on a hullmod carried by a ship. I'll brush right over how I'm acquiring the objectives, but this is the meat of the script that should clear the fog of war (in the "advanceInCombat()" method of the hullmod):
int owner = ship.getOriginalOwner();
FogOfWarAPI fog = engine.getFogOfWar(owner);
...
fog.revealAroundPoint(objective,
objective.getLocation().getX(),
objective.getLocation().getY(),
REVEAL_AREA);
That bit works, it reveals the fog in a circle around the objective in question just fine. But for whatever reason, enemy ships are still invisible within that area. (The objective is being invisibly captured by the enemy despite them having to be within the revealed area.)
- I have also tried this setup where I spawn a custom projectile, with the ship in question as the source, on the point of the objective and then reveal fog around that instead, but the result was the same.
- Further, I'm 99% sure I'm using the setup correctly because I've played with a script revealing fog before, and that was also based on a projectile, however that was run through an everyFrameEffectPlugin as opposed to an advance script.
Does anyone know why the fog is lifted in the area specified, but enemy ships within it are still "hidden"? Have I missed something really fundamental?