Posted by: andwhat - Monday, July 28, 2008 5:07:34 AM
Hi all, I want to make a map that has neutral lasers and emps. Basically, if any player in multiplayer gets near them, they get attacked by the laser or emp. Is there anyway to do this? I know I need power for it, so, I need to know that too. Thanks. Please input the script into this thread so that I may copy it. Thank you.

Posted by: krit - Monday, July 28, 2008 5:52:08 AM
*** IF *** True. *** THEN *** [???] Player 'PlyrCivilian' considers Player 'player0' to be Enemy [???] Player 'PlyrCivilian' considers Player 'player1' to be Enemy [???] Player 'PlyrCivilian' considers Player 'player2' to be Enemy [???] Player 'PlyrCivilian' considers Player 'player3' to be Enemy [???] Player 'PlyrCivilian' considers Player 'player4' to be Enemy [???] Player 'PlyrCivilian' considers Player 'player5' to be Enemy [???] Player 'PlyrCivilian' considers Player 'player6' to be Enemy [???] Player 'PlyrCivilian' considers Player 'player7' to be Enemy That should work by theory but I never tried it myself. It should now get all civilian weapons to attack units and structures owned by any other player when they get close, since they're now considered enemies. Tell me the results after you've tried it.

Posted by: andwhat - Monday, July 28, 2008 6:03:04 AM
[quote=Krit]*** IF *** True. *** THEN *** [???] Player 'PlyrCivilian' considers Player 'player0' to be Enemy [???] Player 'PlyrCivilian' considers Player 'player1' to be Enemy [???] Player 'PlyrCivilian' considers Player 'player2' to be Enemy [???] Player 'PlyrCivilian' considers Player 'player3' to be Enemy [???] Player 'PlyrCivilian' considers Player 'player4' to be Enemy [???] Player 'PlyrCivilian' considers Player 'player5' to be Enemy [???] Player 'PlyrCivilian' considers Player 'player6' to be Enemy [???] Player 'PlyrCivilian' considers Player 'player7' to be Enemy That should work by theory but I never tried it myself. It should now get all civilian weapons to attack units and structures owned by any other player when they get close, since they're now considered enemies. Tell me the results after you've tried it. [/quote] Okay, I will try it. Where in the scripts can i find it?

Posted by: krit - Monday, July 28, 2008 6:05:00 AM
Player > Alliances > Change how a player relates to another player.

Posted by: andwhat - Monday, July 28, 2008 6:13:11 AM
holy smokes! It worked! But, I did it differently. Instead of the player0, player1, player2, etc., I used "local player" and it worked. Will it still work if I play online? I tried player0, player1, etc., but it said that "player0 did not exist".

Posted by: krit - Monday, July 28, 2008 6:17:43 AM
"Local Player" only refers to the game host and therefore will not work with other players such as the AI and other people on a network/online game. Check Section 2 on [url=http://www.cncgeneralsworld.com/forums/topic.asp?TOPIC_ID=9173]my tutorial[/url] for explaination on how to use "player#"s and why you should use them.

Posted by: Drummin - Monday, July 28, 2008 6:52:42 AM
Would that make AI shoot at every civilian thing on the map?

Posted by: krit - Monday, July 28, 2008 6:57:00 AM
No, because the AI will still consider PlyrCivilian as Nuetral.

Posted by: Drummin - Monday, July 28, 2008 7:22:33 AM
Ok Krit, Player0 etc works great, however by doing this the map doesn't reveal itself as human player moves around. Units just move out of sight. Any Ideas for scripting to correct this?

Posted by: krit - Monday, July 28, 2008 7:40:03 AM
I just tested it out. It's just you, everything worked fine over here. Are you sure you have no mods or other scripts interfering? My units moved around and revealed shrouds just fine.

Posted by: Drummin - Monday, July 28, 2008 7:58:09 AM
Again you're correct. I tried this on a blank map and map reveals just fine.

Posted by: andwhat - Monday, July 28, 2008 2:52:24 PM
Wow. I followed your tutorial and tried the map online. It works! Thanks again!