theAlphaDuck
16 years ago
I have come back to generals after many years,
I built many custom maps (mostly single player scripted missions) but that was a long time ago and i apear to have forgotten everything regarding scripting...

I am making a new map for online play... its a new game style based on a tv programme

im hoping it will bring a new tactical skill set to the game...


however i am stuck!

i only need one script running on my map...but i cant get the bu##er to work.

i need to stop a USA chinook from entering a specific area of the map...

as this will give USA an unfair "advantage"...however i dont want to deny USA the chinook unit completely.

If usa is sending the chinook to this area then they are "cheating"

thus i want a script that will kill or remove any chinook belonging to any team if it enters the area...

the map is such that the area concerned is quite specific and small, so i am happy for ANY air unit to be killed if they enter the area

however ground units MUST be able to travel within the area without harm.

your help would be MUCH appreciated!

Sponsor
Drummin
16 years ago
You could try placing some AmericanTankAvengerLaserTurrets (American/System) in the area belonging to PlyrCivilian and making PlyrCivilian the enemy to the players.
Chimpso
16 years ago
Thats a very good idea, or any other AA unit for that matter (although the Avenger Turrent is best).

Hey Drummin!

I need help, what script do you use to make a team an enemy to all the players on the map? Any help would be hot.
theAlphaDuck
16 years ago
ok it looks like the memory loss is more severe than i can remember :P

so i found some tasty scripts to get it done but nothing was working....

im testing my scripts in a map that is not my own...
a few ideas crashed zero hour (tried to spawn an EMP pulse in the air at the location every 10 seconds....but that just caused ZH to crash...

anyway i have found some script that i think should be able to do the job....but i cant get ANY script to work....

which means im missing something pretty fundamental here...

i created the script
IF
"true"
THEN
print debug script "true work"
ELSE
"print debug script "true not work"

thus when playing at least ONE of the msgs should display...but it did not...

initially the script was placed in the "civilian faction"

i tried placing it also in the TEAMplyrUSA faction folder and several others (including nutral) but still no msg!

so what i would really like to know..

is how do i create teams that apply to online multiplayer

in the map i am using to test the scripts the start points are labelled as "Player_1_start" etc.

however i cant create a script team/faction as "player_1" "player1" or anything else

im missing something pretty basic so have checked varios tutorials but cant seem to find what im looking for :-(

this is really starting to bug me...

I can still remember how to make a killer AI for single player but cant even get ANY script to apply to online multiplayer!

can someone please point me in the right direction

thanks

oh and to answer your question chimpso.... i think if i remember correctly you use the EDIT>Edit player list
this should bring up a box that lets you set who is enemy of who...i think.. but then again, i can't be sure of much regarding worldbuilder these days 💀
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
16 years ago
If I'm not mistakened, that script would only work for the faction whose folder it's placed it. This means that you basically had it played to the civilian faction on game start.

For information on refering to skirmish/multiplayer teams, see:
http://www.cncgeneralsworld.com/forums/default.aspx?g=posts&t=5045 
UserPostedImage 
Drummin
16 years ago
Krits tutorial  on transferring units to a player should help for unit transfer however you're not going to have much luck transferring teams. As this is multiplayer only map, you can transfer units and buildings as long as they are named units. AI players will sell buildings. When working with the scripts like shown in the tutorial, keep in mind that "player0", "player1" etc are talking about the rooms and has nothing to do with start location, so you would need to make some logic scripts for determining what player is in each location then make transfers.

Chimpso: You find the script under Team/Alliance but as mentioned above just setting the player relationship on the player list also works and is easyer.
theAlphaDuck
16 years ago
ok so

I create the teams as "player0" - "player3" (its a 4 player map)

and then i label 4 points as "player0_start" - "player3_start" ??? and whoever is in slot one starts in position "0" ..

(im not too worried about transfering units...as long as everybody starts with a CC and dozer im happy)

thank you very much for the help...when i'm finished with the map i shal be sure to submit to the site 😄
Chimpso
16 years ago
No problem, seems that we all need help some way or another.

So lemme get this straight:

Using Krits Tutorial you have to lable the start waypoints as "player_0_start" instead of "player_1_start" ect ect. is that correct?

Also, is the "Edit Player List" able to make the TEAMS hostile to certain PLAYERS? just wanted to know.

Oh and by the way Krit, nice Tutorial. I was thinking about putting one here that helps map makers to make the AI garrison buildings (seeing as It is not the official tutorials).

Anyway I will put it on here anyway, seems that it might help people anyways.
Chimpso
16 years ago
Sorry for the double post, just to let you know that I created it:

you can find it here .
Drummin
16 years ago
No, name your start positions as normal from the drop-down list.

Actually, after double checking things, teams are just not going to work so I would name your units with some identifying name that relates to the base like "BarrackBase1" or "Tank1Base1".

Then it's a matter of finding out which player is in which start location. In the PlyrCivilian folder I would make a folder called "PositionOne". Inside this folder I would make four scripts to check for the player in position one (Checking for player0 through 3 as you mentioned). I would start by making one script that lists all units or buildings and have them transferred to player0. (I just listed one building in these examples.) Copy this script for checking for and transferring to player1. Then again for player2 and player3.

Script Name: Base1Plyr1
*** IF ***
    Player 'player0' starting position is 1.
*** THEN ***
  Unit 'BarrackBase1' is transferred to the command of Player 'player0'

Script Name: Base1Plyr2
*** IF ***
    Player 'player1' starting position is 1.
*** THEN ***
  Unit 'BarrackBase1' is transferred to the command of Player 'player1'

Script Name: Base1Plyr3
*** IF ***
    Player 'player2' starting position is 1.
*** THEN ***
  Unit 'BarrackBase1' is transferred to the command of Player 'player2'

Script Name: Base1Plyr4
*** IF ***
    Player 'player3' starting position is 1.
*** THEN ***
  Unit 'BarrackBase1' is transferred to the command of Player 'player3'

When you have these scripts done, I would export this folder (PositionOne) and Import it back in again into the PlyrCivilian folder. You now have two copies. Modify this second copy for units at start location 2. Again, import another copy for the third and fourth positions.
Chimpso
16 years ago
But i don't get it. Instead of listing EVERY building and unit can't you just make them all on a team. Then keep the IF section and change the THEN section to give control of a team to a player?

Like this:

*** IF ***
If player 'player1' starting position is 1
*** THEN ***
Control of 'BaseTeam1' transfers to 'player1'

Thats would make things a lot easier when transferring a whole bunch of units.
Drummin
16 years ago
I wish you could. If you get it to work, show us a sample map. I've tried creating new players, creating new teams under PlyrCivilian and not been able to make the team transfer with active buildings. Only by using named units. On missions you can make these team transfers but for some reason it doesn't work for multiplayer maps.
Chimpso
16 years ago
Well that sucks. I wil ltry to fiddle around with some more tools.