OK, this new script works perfect. Just like the last one, but I am more clever since I realized I did not need to use the eval statements.
So Good! Right! Nope, we are done with the EASY part. The script properly creates units in the Great Plains or the Ocean Sea, and accounts for each trader, or character, by removing them from the game after one move.
But wouldn't it be more fun if the traders could presist on the map for a duration of time before the script removes them. There are no lock states, so the AI or the human player could mess with the units for several turns, before they are removed.
OK, to do that, we need to attach a proabably to the removal event for each trader and character. Before these events explicity attempted to delete two instances of each unit every turn to insure they were in fact removed.
And this is where all sorts of unexpected results await. So, it is no longer necessary to attempt to remove 2 instances of each unit, and this will save alot of useless script execution, while it attempts to remove ALL the units every turn, whether or not they were actaully created.
So, now each unit removal event, will simply use the Probability condition to determine if will try to remove its correspoinding unit. So I have set this Probability at 40%, while the create unit events are set to 5% for all Indians, and 15% for everyone else. So the removal of a unit should outpace the creation of the same unit.
So, now units can hang in the Great Plains before the script removes them, or before something bad can happen to them in the game. The Bandidios below have been camping for several turns in the OMB.