Posted by: Aafat - Thursday, January 28, 2010 11:24:25 AM
I want the pre-build fortified bunkers garrisoned by infantry for the human player through reinforcement, I'm a bit confused on using codes so all I want is the pre-build fortified bunkers on the map gets garrisoned from the map beginning by each human players, any help will be appreciated.
Posted by: Annihilationzh - Thursday, January 28, 2010 11:52:26 AM
Use 'team>create>spawn...' to spawn them. Then use 'team>transfer control of a team to a player' to move the team from the AI to the players. You will also need to use 'Player>transfer>transfer a specific unit' to move the bunker from civilian to the player. Then use 'team>garrison>garrison a specific building with a team' to make them garrison it.
The whole time using player0, player1, player2, player3, etc for each player identification.
Posted by: Aafat - Thursday, January 28, 2010 12:10:44 PM
WoW! Instant Reply [+1]
I'm done till spawing them but I've the pre-build fortified bunkers that will automatically be given to each human player when the map starts
[b]*** IF ***
[???] Player 'player0' is Faction Name: ChinaInfantryGeneral
*AND* [???] Player 'player0' starting position is 1 .
*** OR ***
[???] Player 'player0' is Faction Name: AmericaLaserGeneral
*AND* [???] Player 'player0' starting position is 1 .
*** THEN ***
[???] Unit 'B1 P1' is transferred to the command of Player 'player0'
[???] Unit 'B2 P1' is transferred to the command of Player 'player0'
[???] Unit 'B3 P1' is transferred to the command of Player 'player0'
[???] Unit 'B4 P1' is transferred to the command of Player 'player0'
[???] Unit 'B5 P1' is transferred to the command of Player 'player0'
[???] Unit 'B6 P1' is transferred to the command of Player 'player0'
[???] Unit 'B7 P1' is transferred to the command of Player 'player0'
[???] Unit 'T1 P1' is transferred to the command of Player 'player0'
[???] Unit 'T2 P1' is transferred to the command of Player 'player0'
[???] Unit 'T3 P1' is transferred to the command of Player 'player0'
[???] Unit 'Oil1 P1' is transferred to the command of Player 'player0'
[???] Unit 'Oil2 P1' is transferred to the command of Player 'player0'
[???] Unit 'P1 P1' is transferred to the command of Player 'player0'[/b]
I also want that If a player is not an Infantry or Laser General the bunkers should become unmanned so that they can be captured, so I used the script [b]Action if false[/b] then unit B2 becomes unmanned, the problem is if I'm playing the map alone the script works fine but when I play it online even choosing Laser or Infantry General the bunkers become unmanned which I want only if the player isn't on the required faction.
So in that case the same is with the reinforcement team that if human player (player0, player1...) isn't on the required faction the reinforcement shouldn't occur.
Hope I clarified good enough to understand
Posted by: Aafat - Friday, January 29, 2010 1:40:53 PM
please anyone who can help me with that please read my above post
Posted by: Aafat - Friday, January 29, 2010 7:54:31 PM
Well I tried this but it didn't worked, I made the teams on the civilian side was it right?
[b]*** IF ***
[???] Player 'player0' is Faction Name: AmericaLaserGeneral
*AND* [???] Player 'player0' starting position is 1 .
*** OR ***
[???] Player 'player0' is Faction Name: ChinaInfantryGeneral
*AND* [???] Player 'player0' starting position is 1 .
*** THEN ***
Spawn an instance of Team 'BR P1 1' at Waypoint 'BR P1 1'.
Spawn an instance of Team 'BR P1 2' at Waypoint 'BR P1 2'.
Spawn an instance of Team 'BR P1 3' at Waypoint 'BR P1 3'.
Spawn an instance of Team 'BR P1 4' at Waypoint 'BR P1 4'.
Spawn an instance of Team 'BR P1 5' at Waypoint 'BR P1 5'.
[???]Control of Team 'BR P1 1' transfers to Player 'player0'
[???]Control of Team 'BR P1 2' transfers to Player 'player0'
[???]Control of Team 'BR P1 3' transfers to Player 'player0'
[???]Control of Team 'BR P1 4' transfers to Player 'player0'
[???]Control of Team 'BR P1 5' transfers to Player 'player0'
Team 'BR P1 1' enters into building named Unit 'B1 P1'
Team 'BR P1 2' enters into building named Unit 'B2 P1'
Team 'BR P1 3' enters into building named Unit 'B3 P1'
Team 'BR P1 4' enters into building named Unit 'B4 P1'
Team 'BR P1 5' enters into building named Unit 'B5 P1'[/b]
Posted by: Annihilationzh - Friday, January 29, 2010 7:59:28 PM
I was referring to using the AI, not civilian, because civilian teams are infamous for not working. If even the AI doesn't work, I apologise. I dispise world builder for it's endless errors.
Posted by: Aafat - Friday, January 29, 2010 8:15:26 PM
Thanks [+1] for instant reply & I'll try my chances & post whatever happens.
Posted by: Drummin - Friday, January 29, 2010 8:37:09 PM
Spawning named units to PlyrCivilian at each point and telling them to garrison a particular bunker works. Now it's just a matter of making a script for each faction and start location. (Copy edit copy edit) I would set these (48) spawn/move scripts to non-active and then have another set of scripts to check the faction at each start location and activate the correct script. I would use this script to also set a timer to delay transfer til the units have garrisoned the bunkers.
You would also need to know what "Room" number is playing in each start position, so this set of scripts would then activate the correct transfer script for each start location, which is trigger by the timer set above. This all can be done and although it may seem like a lot it's nothing compared to my Urantian Conflict, which took me many, many months of copying and editing scripts.
Posted by: Aafat - Friday, January 29, 2010 8:38:41 PM
I regret to say that it's not [-1] working either on any of the A.I.
I wish there might be some another way of achieving that rather than doing manually in the game.
Posted by: Drummin - Friday, January 29, 2010 9:13:39 PM
I've attached a zipped file called Bunkers. Unzip the file and import it into PlyrCivilian. If you have trouble with this let me know. Note this is only for one bunker, position 1, player0, USA. [ATTACH]545[/Attach]
Posted by: Aafat - Saturday, January 30, 2010 6:53:33 AM
Well I was successful [+1] in one way of having reinforced teams garrisoned the bunkers, I put the script in the GLA A.I. which is the AOD Boss, the reinforcement did occurred and they also garrisoned the bunker but the problem is that on radar it didn't changed it's color to my color, if GLA is red the reinforce units will be red on radar, similarly is with other colors, but they'll will do what you'll tell them to do, here's the script I've used.
[b]
*** IF ***
True
*** THEN ***
Spawn an instance of Team 'BR P1 1' at Waypoint 'BR P1 1'.
[???]Control of Team 'BR P1 1' transfers to Player 'player0
Team 'BR P1 1' enters into building named Unit 'B1 P1'[/b]
Posted by: Aafat - Saturday, January 30, 2010 6:55:37 AM
Aah! Drummin
I already tried that thing which you've posted I wonder if there's any way of changing it's color to mine else it's working cool.
Thanx for the reply
Posted by: Aafat - Tuesday, February 9, 2010 2:43:05 AM
Drummin in the "Bunker" script comment you wrote this. I didn't understood how to avoid making a lot of copies & save time.
[quote]Instead of making a copy for each faction you opt for making a mixed group of units. You could then remove the "faction" condition and save yourself a buch of copying. What ever way you go, I would add units for all bunkers for this start location on this script.[/quote]
Posted by: Drummin - Tuesday, February 9, 2010 5:41:47 AM
I don't have the map up right now but what I was talking about was not making a script/team of units for each faction, i.e. USA, China, GLA etc. As I recall I had a condition something like [code]***IF***
Player '' is faction USA
and
Player '' start position 1
***THEN***
Spawn the USA group of units.[/code]
By removing the faction condition and spawning a generic team for any player type, would save you needing to make another 11 copies (for each faction) for each start location.
Posted by: Aafat - Tuesday, February 9, 2010 8:08:16 PM
But in the code it says that
[quote]
[b]***IF***
Player '' start position 1
***THEN***
Spawn the USA group of units to way point X.[/b][/quote]
But what if player0 starts on position 2, 3, 4 etc
Still I've to make copies for those positions.
I'm attaching the map for you. [ATTACH]554[/Attach]
Posted by: Drummin - Tuesday, February 9, 2010 10:26:13 PM
OK. The point is that this is a fairly large script set.
For each position you need eight possible players, (player0 through player7)= Eight scripts X Four positions = 32 scripts.
IF you were also going to consider factions, that would multiply this times twelve. = 384 scripts. Worth doing? I think not, which is why I included the comment about making a generic team for all faction types and scripted the sample without that condition included.
Once you get one script done just copy it and edit the variables. It will take a bit to do but you can do it.
Posted by: Aafat - Tuesday, February 9, 2010 10:53:55 PM
Well it doesn't matter what the faction will be, every faction will have the same team i.e.
5 Mini Gunners
4 Missile Defenders
1 Pathfinder
But for now I'm considering the team for only Laser General & Infantry General or any one of them so I'll make the script like this
[quote]***IF***
Player0 faction is AmericaLaserGeneral
&
Player0 starting position is 1
Or
Player0 faction is ChinaInfantryGeneral
&
Player0 starting position is 1
***THEN***
Spawn team 123 at way point 123
Team 123 is transferred to player0
Team 123 garrison building B1[/quote]
& for Laser or Infantry only I would remove the 'OR' condition.
Then I've to make 8 scripts for 8 starting positions.
I would appreciate if you show me an example I'm a bit exhausted :banghead: by continous scripting so it's taking me time to get to your point.
Posted by: Drummin - Wednesday, February 10, 2010 5:46:59 AM
Your quoted example looks fine to me. What was your question?
Posted by: Aafat - Friday, February 12, 2010 11:03:22 AM
I'm having problems on this map don't know what's gone wrong & where, it might be started when I tried to use this code I'm pasting below.
1. The game starts to lag after wave 1 or wave 3 or even from the start when I play this online.
2. The reinforcements are fine as I want them to be but on the radar it doesn't changes the color to my color it remains on enemy's color that surprises a lot of players, they think that they're enemy units but they're not.
I put that script in the GLA folder for 6 players & 4 positions for each player.
[quote][b]*** IF ***
Timer 'Intro 3' has expired.
*AND* [???] Player 'player0' starting position is 1 .
*** THEN ***
Spawn an instance of Team 'B1 1' at Waypoint 'B1 1'.
Spawn an instance of Team 'B1 2' at Waypoint 'B1 2'.
Spawn an instance of Team 'B1 3' at Waypoint 'B1 3'.
Spawn an instance of Team 'B1 4' at Waypoint 'B1 4'.
Spawn an instance of Team 'B1 5' at Waypoint 'B1 5'.
Spawn an instance of Team 'B1 6' at Waypoint 'B1 6'.
Spawn an instance of Team 'B1 7' at Waypoint 'B1 7'.
[???]Control of Team 'B1 1' transfers to Player 'player0'
[???]Control of Team 'B1 2' transfers to Player 'player0'
[???]Control of Team 'B1 3' transfers to Player 'player0'
[???]Control of Team 'B1 4' transfers to Player 'player0'
[???]Control of Team 'B1 5' transfers to Player 'player0'
[???]Control of Team 'B1 6' transfers to Player 'player0'
[???]Control of Team 'B1 7' transfers to Player 'player0'
Team 'B1 1' garrison a nearby building.
Team 'B1 2' garrison a nearby building.
Team 'B1 3' garrison a nearby building.
Team 'B1 4' garrison a nearby building.
Team 'B1 5' garrison a nearby building.
Team 'B1 6' garrison a nearby building.
Team 'B1 7' garrison a nearby building.[/b][/quote] [ATTACH]559[/Attach]
Posted by: Drummin - Friday, February 12, 2010 11:30:17 AM
"Room Scripting" only works in PlyrCivilian folder. You also have duplicate folder or script names, which you should try to avoid. "Room type" teams (teamplayer1) does not work for players other than player0.
Posted by: Aafat - Friday, February 12, 2010 12:18:12 PM
are you talking about these folders?
player 1
player 2
player 3
player 4
player 5
player 6
I didn't understood about Room scripting & room types [sad]
Posted by: Drummin - Friday, February 12, 2010 12:31:39 PM
Yes those folders and position scripts.
Referring to a player as player0 etc. is room scripting.
Posted by: Aafat - Friday, February 12, 2010 1:14:39 PM
ok I've renamed the folders as 1, 2, 3, 4, 5, 6 & scripts A, B, C, D but I've played this before also & there was no lag, if I put the script in the civilian folder the spawing doesn't occur.
[quote][b]Spawn an instance of Team 'B1 1' at Waypoint 'B1 1'.
Spawn an instance of Team 'B1 2' at Waypoint 'B1 2'.
Spawn an instance of Team 'B1 3' at Waypoint 'B1 3'.
Spawn an instance of Team 'B1 4' at Waypoint 'B1 4'.
Spawn an instance of Team 'B1 5' at Waypoint 'B1 5'.
Spawn an instance of Team 'B1 6' at Waypoint 'B1 6'.
Spawn an instance of Team 'B1 7' at Waypoint 'B1 7'.
[???]Control of Team 'B1 1' transfers to Player 'player0'
[???]Control of Team 'B1 2' transfers to Player 'player0'
[???]Control of Team 'B1 3' transfers to Player 'player0'
[???]Control of Team 'B1 4' transfers to Player 'player0'
[???]Control of Team 'B1 5' transfers to Player 'player0'
[???]Control of Team 'B1 6' transfers to Player 'player0'
[???]Control of Team 'B1 7' transfers to Player 'player0'
Team 'B1 1' garrison a nearby building.
Team 'B1 2' garrison a nearby building.
Team 'B1 3' garrison a nearby building.
Team 'B1 4' garrison a nearby building.
Team 'B1 5' garrison a nearby building.
Team 'B1 6' garrison a nearby building.
Team 'B1 7' garrison a nearby building.[/b][/quote]
Posted by: Drummin - Friday, February 12, 2010 1:24:24 PM
We're checking for players and making transfers using room scripting so those things need to go in the civilian folder. PlyrCivilian doesn't handle teams well but works for named units. This is why the file I uploaded called Bunkers used named units and not teams to be used in the civilian folder.