andwhat
  • andwhat
  • 80.75% (Honored)
  • Private Topic Starter
17 years ago
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.
Sponsor
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
17 years ago
*** 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.
UserPostedImage 
andwhat
  • andwhat
  • 80.75% (Honored)
  • Private Topic Starter
17 years ago

*** 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.

Krit wrote:



Okay, I will try it. Where in the scripts can i find it?
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
17 years ago
Player > Alliances > Change how a player relates to another player.
UserPostedImage 
andwhat
  • andwhat
  • 80.75% (Honored)
  • Private Topic Starter
17 years ago
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".
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
17 years ago
"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 my tutorial  for explaination on how to use "player#"s and why you should use them.
UserPostedImage 
Drummin
17 years ago
Would that make AI shoot at every civilian thing on the map?
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
17 years ago
No, because the AI will still consider PlyrCivilian as Nuetral.
UserPostedImage 
Drummin
17 years ago
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?
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
17 years ago
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.
UserPostedImage 
Drummin
17 years ago
Again you're correct.
I tried this on a blank map and map reveals just fine.
andwhat
  • andwhat
  • 80.75% (Honored)
  • Private Topic Starter
17 years ago
Wow. I followed your tutorial and tried the map online. It works! Thanks again!