CNC_Mapper
  • CNC_Mapper
  • 64.25% (Friendly)
  • Private Topic Starter
13 years ago
How would you script for all teams to have defenses when the game starts?
Sponsor
SUPER-G
13 years ago
if its for a mission:

place down defence units (like the gatling cannon or patriot missle) like you would place down normal buildings, they are found in different folders, like the gatling cannon is found in the china folder and the patriot missle is found in the america folder.

once you have placed them, if you have made a computer player (AI) that is the enemy then select the object, then click on the arrow on the teams section, then select the team you are using.

if its for a skirmish map:

...i dont know.
UserPostedImage
PK_Soar #9531
He that is slow to believe anything and everything is of great understanding, for belief in
one false principle is the beginning of all unwisdom. - Anton Lavey

i^love^mixery
13 years ago
as SUPER-G said its important for us to know wether this is going to be a skirmish map or a mission map.

also if its for a skirmish map is it fine if the same buildings spawn for every faction or do you want GLA deffence for GLA players, laser turrets for laser general etc.?
SUPER-G
13 years ago
you could try making a waypoint and calling it defence1 or something like that.

then you can try to spawn buildings using some script and make them enemies of other players.
UserPostedImage
PK_Soar #9531
He that is slow to believe anything and everything is of great understanding, for belief in
one false principle is the beginning of all unwisdom. - Anton Lavey

CNC_Mapper
  • CNC_Mapper
  • 64.25% (Friendly)
  • Private Topic Starter
13 years ago
It is for a skirmish map, and i'd prefer laser for laser gen , super weeapon defense for super weapon general..
How would you script it?
i^love^mixery
13 years ago
the user "Drummin" has already created a map like that but i forgot the name of it. it contains like 1.500 scripts only to spawn default base deffences like that. it can be made a little easier but you will still need around 100 scripts and many hours of copy&paste.
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
13 years ago
http://www.cnclabs.com/forums/cnc_postst5045_WB-Tut--Identifying-Players-and-Related-Scripts.aspx 
Check sections 1, 2, 4, and 5.
(Section 5 actually has a similar script as an example, but it would be helpful to read the other sections first to understand how it works.)

For the map to be fully functioning, with every faction and subfaction getting something unique, you'll need at least 8 x 12 x (amount of map players) scripts. Considering since some subfaction's defenses are the same, the actual numbers would be lower.
UserPostedImage 
i^love^mixery
13 years ago

http://www.cnclabs.com/forums/cnc_postst5045_WB-Tut--Identifying-Players-and-Related-Scripts.aspx
Check sections 1, 2, 4, and 5.
(Section 5 actually has a similar script as an example, but it would be helpful to read the other sections first to understand how it works.)

For the map to be fully functioning, with every faction and subfaction getting something unique, you'll need at least 8 x 12 x (amount of map players) scripts. Considering since some subfaction's defenses are the same, the actual numbers would be lower.

Originally Posted by: Krit 



but as far as i know comps will sell buildings if you transfer them with player -> transfer, right?
CNC_Mapper
  • CNC_Mapper
  • 64.25% (Friendly)
  • Private Topic Starter
13 years ago
That's alot of scripts to use, I have found the map.. Would Ineed exactly the same scripts in my map? Or is there any easier way?
CNC_Mapper
  • CNC_Mapper
  • 64.25% (Friendly)
  • Private Topic Starter
13 years ago
I can't open the scripts up on the map, worldbuilder keeps freezing when i try opening the scripts.
SUPER-G
13 years ago
what computer are you using?
what manufacturer is it from (Toshiba, Acer ect).

my computer is a Toshiba and it doesnt do well with video games, and sometimes with WB too.
maybe that could be the problem.
UserPostedImage
PK_Soar #9531
He that is slow to believe anything and everything is of great understanding, for belief in
one false principle is the beginning of all unwisdom. - Anton Lavey

i^love^mixery
13 years ago
CNC_Mapper you just have to wait. it could take up to 15 minutes. as i said there are 1.500 scripts.

go to another map first and turn off auto verify in the script menu there, then go back to the 1.500 script map and open script menu. that should shorten the process.

and yes there is an easier way. ill take a look into it now.
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
13 years ago

http://www.cnclabs.com/forums/cnc_postst5045_WB-Tut--Identifying-Players-and-Related-Scripts.aspx
Check sections 1, 2, 4, and 5.
(Section 5 actually has a similar script as an example, but it would be helpful to read the other sections first to understand how it works.)

For the map to be fully functioning, with every faction and subfaction getting something unique, you'll need at least 8 x 12 x (amount of map players) scripts. Considering since some subfaction's defenses are the same, the actual numbers would be lower.

Originally Posted by: i^love^mixery 



but as far as i know comps will sell buildings if you transfer them with player -> transfer, right?

Originally Posted by: Krit 



I believe, but is unable to verify, that they will always sell buildings transferred or spawned for them regardless of method, unless you start modifying the actual AI scripts.
UserPostedImage 
i^love^mixery
13 years ago
no they wont sell them if you spawn them.
CNC_Mapper
  • CNC_Mapper
  • 64.25% (Friendly)
  • Private Topic Starter
13 years ago
I left it on a went out for a few hours and it did work in the end:), but there is so many scripts!!! And i have never had any problems with the computer teams selling their buildings. Thanks for all the help guys
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
13 years ago

no they wont sell them if you spawn them.

Originally Posted by: i^love^mixery 



Oops. My bad.


UserPostedImage 
i^love^mixery
13 years ago

I left it on a went out for a few hours and it did work in the end:), but there is so many scripts!!! And i have never had any problems with the computer teams selling their buildings. Thanks for all the help guys

Originally Posted by: CNC_Mapper 



he sells them ONLY if you use the script player -> transfer. he does NOT sell them if they are spawned for him directly.

he does that probably because of the black lotus backdoor attacks or something like that..
i^love^mixery
13 years ago
i thought about it a little and came up with an easier solution just now..

for USA on a 4 players map you would need the following 4 scripts in the USA script folder:

*** IF ***
     Player '<This Player>' starting position is  1  .
*** THEN ***
  Spawn Unit 'B_1_01' of type 'AmericaFireBase' on Team 'teamSkirmishAmerica' at waypoint Waypoint 'B_1_01'


*** IF ***
     Player '<This Player>' starting position is  2  .
*** THEN ***
  Spawn Unit 'B_2_01' of type 'AmericaFireBase' on Team 'teamSkirmishAmerica' at waypoint Waypoint 'B_2_01'


*** IF ***
     Player '<This Player>' starting position is  3  .
*** THEN ***
  Spawn Unit 'B_3_01' of type 'AmericaFireBase' on Team 'teamSkirmishAmerica' at waypoint Waypoint 'B_3_01'


*** IF ***
     Player '<This Player>' starting position is  4  .
*** THEN ***
  Spawn Unit 'B_4_01' of type 'AmericaFireBase' on Team 'teamSkirmishAmerica' at waypoint Waypoint 'B_4_01'

so you would need 8x12=96 scripts on a 8 players map to cover all factions and all spots. still something but way better than 1.500+. this is definitely the easiest way there is.

but you would still need to import the entire AI scripts into your map because the comps dont work once you put scripts into their scipt folders(drummin did the same thing in his map).

but there is a bug about the scripts and the order of them is screwed up once you import them and i am not too sure how to fix it.

also this scripts will only work for skirmish players but i could come up with a solution for human players too IF you decide to go this way (yes/no?).
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
13 years ago
And if I recall correctly, it also crashes if there's more than one AI player using the American faction...
UserPostedImage 
i^love^mixery
13 years ago

And if I recall correctly, it also crashes if there's more than one AI player using the American faction...

Originally Posted by: Krit 



nope i tested it. it works.