![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
07-01-13, 12:12 PM
|
#11 |
|
Black Magic
![]() |
things will get really interesting once I finish the carriers spawning aircraft patch for the game.
Here's how the game works in regards to carriers and airbases (land): A timer is checked to see if it's time to spawn airgroup units. If it's time: game goes through every unit in the game and compares the distance from them to the carrier/airbase to a fixed value. If the distance is within the fixed value the game will spawn an airgroup unit. The airgroup unit is given random starting position and random waypoints. My patch changes the code in the above so that if the unit is a carrier and the carrier has the unit as a contact then an airgroup unit is spawned. It's starting position is the carrier. It's given a waypoint of the contact's current position and another waypoint as the carrier's current position. This means the unit will head directly to the contact and once done return to the carrier position (when it spawned the aircraft). The unit is free to engage other contacts if it detects them (a la IRAI) before arriving at unit's position or when returning to the carrier. I could make it really complex and update the airgroup unit's carrier's waypoint with the carrier's current position so that the unit will always return to the carrier's current position but decided it wasn't worth the time and code. Instead I set the altitude to a ridiculously high value so you'll never see it disappear from the game ![]() I've been working on this patch for over 4 months and the end is near
|
|
|
|
|
