Blah, I would almost second Masamune's point, except I don't even have time to work on my own TC lately )-:
I think I'll just post about how to tackle this challenge on the board (kinda like revealing the answer, though I myself hasn't have everything worked out yet).
I'll start with the straight-forward way (my way is unnecessarily complicated, and I'll post what I do with that some other day).
For the straight-forward way, for each system in the shortest route, you create a cron and a mission for each AI racer and have a control bit for it. The cron will, on start, start the associated mission (which just creates an AI racer ship in a particular system), set the associated control bit to On, and when the cron ends abort the associated mission.
The control bit which got turned on will be the required bit for the cron associated with the next system to start. For the sake of simplicity, use b1xx for AI 1 (the xx correspond to the nth system on the route), b2xx for AI 2 and so on.
These resources easily simulates the 3 AI-racers flying through the course.
Now for each system that has a waypoint, you create a mission, which places a Judge ship in the system with the waypoint with the shipgoal to be observed by the player (I like to place the judge ship in a combat-heavy system and have it flying around ranodmly cloaked...). Now, say waypoint 2 is the 8th system in the route, then b108, b208, and b308 corresponds to whether racers 1~3 have passed through this waypoint already. So when shipgoal is acheived, you can use those three bits in the desc resource to say "Racer 01 is (b108 "before" "after") you, Racer 02 is (b208 "before" "after") you, ...
This will make the judge tell you how you are doing in the race (which racers are before/after you), and hope you can figure out the placement by yourself.
The finishing line is trickier. Say that last system is the 80th system in the route, then a b180 being set means racer01 is already in the system. But technically you and racer01 might arrive at the same day. Hence a virtual-system is created that also has a cron, and sets b181, to simulate racer01 is more than a day in the system already.
When you show up in the last system, another shipgoal happens, but this time it puts 3 crons at work, each can only start under the conditions "b180", "b280", and "b380", and would randomly set or do nothing to b181, b281, and b381 respectively, so that if ships arrive in the system the same day, who wins is randomly determined by the last cron.
You need to land the last planet to win, and it'll have 4 missions corresponding to each place in the race, and only available through a huge mess of logical statements (for example, to test for third place, the expression is "(((b181 & b281) & !b381) | ((b281 & b381) & !b181)) | ((b381 & b181) & !b281)"
This only leaves out checking the race status when landing on planets, which I originally had a plan but realized it wouldn't work. One possibility is to have about 16 crons each representing each possible order of ranking of racers (including ties), and each is activated only upon a logical expression that is longer than this post to be true (or you can double the number of crons and half the size of the logical expression and keep going...). Then each cron, with duration 0, would activate a news that shows up in bars.
However, since the player is also being compared, we need bits showing players progress. We can either only do progress at waypoints (use b1x, b2x, b3x, b4x to track how many waypoints have been passed. b1x~b3x are set by their respective crons when the ai ship is in that system, b4x would be set by the judge ship when shipgoal is done), or alternately we can make the galaxy map a one-route only map, and track player's progress through each system (requiring an additional mission per system that sets bits b4xxx on shipgoal done).
For example, the logical expression to display the news "Rancer01 is taking the lead, followed by racer02, then racer03, and finally the player!" is basically testing (using a notation NOVA won't accept, but much easier for us to read):
(b19 & !b29 & !b39 & !b49 & (b28 & !b38 & !b48 & ((b37 & !b47)|(b36 & !b46)|(b35 & !b45...
This is a really really long process, though in my unnecessarily complex approach, determing this ordering is faster by an order of a log (it's complex in lots of other places though)
------------------
Fundraising to buy a mac so I can play EV:N without using a Emulator (too slow with carrier combats) or taking over my best friend's computer.
Please send all contributions via paypal to panguim@uclink4.berkeley.edu
Making a TC based on J.R.R. Tolkein's works. (url="http://"http://www.ev-nova.net/forums/viewtopic.php?t=935")http://www.ev-nova.n...topic.php?t=935(/url)