Savagess2546
17 years ago
Is there any possible way to have the civilian faction attack other factions only if attacked or being captured? I set the player settings so that all factions except the USA ones were enemies of the civilian. And then I scripted it so that if any factions besides the USA discovered the civilian faction then the civilian would attack them. But that didn't work. Any ideas?
They want war? We'll give 'em war.
Sponsor
Me Myself and Pi
17 years ago
This sounds like your trying to do it on a skirmish/multiplayer map. Is that so?
Savagess2546
17 years ago
Yes. It is on a multiplayer/skirmish map. Specifically skirmish since I never play with anybody.
They want war? We'll give 'em war.
Drummin
17 years ago
I could only get the AI (Civilian) unit to go after the Local player and not any other AI player's. I think it has to do with the other AI player's not being recognized (AT ALL) which is the same problem I was having because folders do not connect across players. The term '' doesn't work as you might think it would.

You could have these units controlled by a AI USA player hidden in the corner of your map. You would need to do some scripting for these units to be inactive until discovered because of the folder issue I was talking about. I would probably spawn unnamed units though instead of naming each inactive unit.
Me Myself and Pi
17 years ago
Well to get it to work at all, any script that refers to a skirmish player will only work in that player's script folders. So for a script that refers to the USA player. That script must be in the PlyrAmerica folder in order to work. But when you do this, the AI scripts that EA Games made won't take affect in your map. So then you'll need to import them into your map:
Download Attachment: UserPostedImage Skirmish Scripts.zip 
229.84 KB

Be sure to uncheck Auto Verify first & it take about 30 annoying seconds to load up the script window each you have the skirmish scripts imported into your map. There are a lot of them! So be sure that all you other scripting is done or almost done before importing.

You can just import them right from the game directory, but then they won't come in the right folders. These script are the same, just rearranged correctly.

Now we come down to the problem with your scripts. It sounds like you need to refer to several of the same computer players with one script. To do this, you'll have to create multiple scripts each referring to the right computer player & then having one script from one folder deleting already placed unit on the map. Then have another script from another folder wait for the unit to be destroyed. This is the only way you can communicate between the folder. Timers & flags won't work.
Drummin
17 years ago
To script the idea I gave above was really very simple to do compared to the scripts I've been working on. Mostly because units are turned over one time and then belong to the hidden AI player from then on.

You can put any AI player in the "hidden" area on the sample map. When playing you can also choose who's side this player is on just like any other player.

I went ahead and used a named unit to turn over to hidden player but you could spawn a unit just as easily. This would also allow you to spawn units of different types depending on which player you place in the "hidden" area when playing.
Note: If you spawn, don't use . Use the team name that corresponds to the players folder such as 'teamSkirmishAmerica'.

Download Attachment: UserPostedImage ATank.zip 
174.4 KB