PDA

View Full Version : Mystery invasions?


Hieronymus
03-25-2007, 03:08 PM
Ok, this one really has me baffled.

Testing my latest scenario, I was hit by an invasion I was sure I hadn't scripted. So I checked and double checked the script and, no, it wasn't the one I had set up: it was the wrong time, wrong place, wrong composition and wrong bribe level. :eek: Later on, the invasion I had scripted turned up as expected. So, I have a scenario with an invasion that shouldn't be there. :confused:

Anyone else encountered this problem before? I can only assume that there is some remnant of a previous invasion in the .scn file. Right now I'm working out how to get rid of it. The options I can think of are:
Get rid of the waypoints. Will this prevent the invaders appearing, or will they just default to another?

Use something like game.StopCurrentInvasions or game.StopInvasion shortly after it arrives.

Leave it in and wear an evil grin after posting it ;)

Any suggestions?

ClaudiusXXXIII
03-26-2007, 01:04 PM
Hi Hieronymus,
I have not experienced the mysterious invasion problem, however if you remove the waypoint, the invasion force will move to another point (unless that point is in the middle of the water). I experienced an invasion that was mistakenly set up for waypoint 6 and even after deleting all the waypoints one by one, it still showed up at the migration point.

Just a thought, if you copied the .scn file from another scenario, possibly that had a hidden city on the empire map spawning invasions.

Sounds like it is evil grin time...*L*

Hieronymus
03-26-2007, 03:09 PM
Thanks Claudius - I suspected that might be the case with the waypoints.

However, I have found a solution. I managed to produce a script that makes the enemy cohorts run away after a specified period of time. So I think I will leave it in - since anyone who decides to pay the bribe will actually be wasting their denarii :D

Hieronymus
03-28-2007, 03:16 PM
I've now been able to get rid of this mystery invasion - by calling game.ClearInvasions() at the start of OnBeginScenario (and before the intended invasions). Just in case anyone else encounters the same problem...