[quote="QuaziGNRLnose":3ob58mvi][quote="Wanderer":3ob58mvi]Yup, but the problem with the enemy's pathfinding is still on.
Is there a script or something which calculates the path that the AI have to move to go near your troops?[/quote:3ob58mvi]
Im afraid something like that would be way to general, the only way to go about it is to program your own enemy ai. If they just blindly attack theyll be retarded, and you need to make sure the AI plays like a human player with similar disadvantages (LOS etc), you'll also want to make sure they build counter units to yours if they catch a glimpse of what you have, and their force is deemed weaker by some arbitrary formula you'll have to make up.
Since any good AI should be limited to the abilities of a human player, unless your game absolutely dictates otherwise you can see why making them just SEND attack forces to you if they have no sight of your units would be a little unfair. the AI should scout to find you, just like any human would.
All this is pretty general, its up to you to figure out a way to get it into your game with your programming, theres no easy way, but making use of RTS pathfinding should make it much easier to give the AI routes. for example to scout you dont need to make some movement script, just make the AI send the scout unit to some random point it can't see, where it thinks there are no units etc, make a soldier unit walk up to range from some enemy to engage it.
Good luck!, im sure there are some good resources on RTS AI programming around the web you could use to help you, google is your friend. Gamedev.com would be a good place to look aswell.[/quote:3ob58mvi]
EDIT: first google result was a gamedev article about exactly this http://www.gamedev.net/community/forums ... _id=329005