Friday, March 8, 2013

NavTac - Log #10

I really thought I'd be posting media and maybe playable demos more often with these logs. That'll probably come soon, but probably won't be much for this game.

Did some more scripting today, added a few functions to the navigation and cleaned stuff up. I did end up switching those multiple bools into an enum, which is working nicely and is cleaner to read. I also coded in two new functions for player ships, called FindPathToTarget and FollowTarget. The first one will generate a path to an enemy target the player has designated - but only if the ship is not already on a player-made path. If the ship is on this generated path and the player draws a path for it to follow, it will jump to the player-drawn path but keep its current target for combat. Player-created paths always take precedence over generated to-enemy paths.

The other one, FollowTarget, is something of a convenience/escort ability which will allow the player to drag a unit's path marker over a friendly unit, and then the ship the player was dragging from will follow that other ship wherever it goes. This cancels out player-paths, but is also cancelled by player-paths. It also cancels and is cancelled by generated to-enemy paths. So lots of leeway for whenever you decide you want one ship to follow another.

I plan to do more tomorrow, and the next thing I have on the list involves a new version of the game camera and how it works.

No comments:

Post a Comment