Thanks, I'll have to try that later today. The main reason I'm migrating is because I can get all my ships/planes to move (even can get planes to constantly keep a 90 degree angle against enemy ships), but can't seem to get any state changes in there all together. That is, the piece that launches bombers from carriers is completely separate from the movement code, which I want to avoid. Separate functions are ok, but they're not tied to each other in any kind of way, so I can dynamically launch planes based on enemy ships yet. Ok, I can, but I can't do much more than that without it hanging.
So far, I can get within 20 points of a tie (as NA vs EU, against CPU) with only silos launching and bombers flying (no SRBM's, yet), no subs and a chaotic mess of a fleet...
Code: Select all
If yourship comes within n of myship, move myship smallR (random direction, set distance)
I've also got a very choppy way to remove destroyed units from tables using OnEvent. However, I've noticed that it seems if multiple gunshots strike a target the moment it dies, it wants to try and perform the removal as many times as there were gunshots.
Hey, it's a start and units are moving.
Edit: forgot to mention that when I first tried this, I had the whiteboard show me which myunit was moving based on which enemyunit; it was like watching StarWars (whiteboardclear, whiteboard draw, repeat).
Pew, pew, pew, ship killed.