Posted by: verbal - Wednesday, February 4, 2009 8:47:51 PM
i wanted to set up a map so that when you enter certain building, you gain control of certain sets of vehicles. I did a test script and it worked so when i occupied a certain area tanks came over to it, and when you occupied the building you gained control of them. To do this i put all the tanks as "teamtank". but the only issue i'm having is it only seems to want to let me add 1 team. Is that a limitation of the worldbuilder, or am i missing something?
Posted by: Drummin - Wednesday, February 4, 2009 10:19:15 PM
Hey Verbal,
I tried a number of different things to test this for you and was unsuccessful at making any individual team transfers. I think the best way would be to use named units as explained in [url=http://www.cncgeneralsworld.com/forums/default.aspx?g=posts&t=5045]Krits tutorial[/url].
Posted by: verbal - Thursday, February 5, 2009 9:32:05 PM
http://www.cncgeneralsworld.com/forums/default.aspx?g=posts&t=5045
This is the tutorial i used. I have it so when you enter the Combat Zone the units move to their staging area. So instead of making groups of say 5 tanks and making it a team, i made 30 tanks all in team "teamtank". Each of these units is seperately named battle1, battle2, battle3...... so i have to script each one getting handed over, then write a disregard script for all the players who didn't occupy that building. It works, just a ton of scripting for a seemingly easy task. Reminds me a lot of pascal.
script1
***IF***
Player "Player0" has units in area "tankstrans1"
***THEN***
Move Team "teamtank" to "Waypoint 19"
script2
***IF***
Player "Player0" has entered building named "tanktent"
***THEN***
Unit "battle1" is transferred to the command of "Player0"
So now my only problem is i have to move all my units at one time to one location (then clause, script1)
there is only a waypoint move under *team, none under *unit.
so i can't[left][/left] send 5 tanks here, or 5 tanks there, its either all or none. but i can transfer them independantly.
Posted by: Drummin - Thursday, February 5, 2009 10:37:02 PM
There is a "Move Unit" script line so you could move groups to different locations.
[code]*** IF ***
Player 'player0' has units in area 'CombatZone'.
*** THEN ***
Move Unit 'Tank1' to Waypoint 'Stage1'.
Move Unit 'Tank2' to Waypoint 'Stage1'.
Move Unit 'Tank3' to Waypoint 'Stage1'.
Move Unit 'Tank4' to Waypoint 'Stage1'.
Move Unit 'Tank5' to Waypoint 'Stage1'
Move Unit 'Tank6' to Waypoint 'Stage2'.
Move Unit 'Tank7' to Waypoint 'Stage2'.
Move Unit 'Tank8' to Waypoint 'Stage2'.
Move Unit 'Tank9' to Waypoint 'Stage2'.
Move Unit 'Tank10' to Waypoint 'Stage2'.[/code]
Posted by: verbal - Friday, February 6, 2009 1:02:26 PM
That is what i want to do, but i cant find an appropriate move option under either heading. here is what i see under *unit*, and *move* [ATTACH]286[/Attach] [ATTACH]287[/Attach]
Posted by: Drummin - Friday, February 6, 2009 1:30:04 PM
In the Unit section, Expand or Open the folder called "Move", which will then list all the "Move" actions just as you've done in the Team section in the image above.
Posted by: verbal - Friday, February 6, 2009 1:33:51 PM
thats what the second picture is. None of the listed options seem to have a unit move to a specific location. on face that way. that is why i had to move the whole team at once. The script you typed is what i would like it to do. Can scripting be typed in to the editor, or must it be picked from a list. I scripted pascal for 6 years, there is very little difference from that.
Posted by: Drummin - Friday, February 6, 2009 2:39:59 PM
See The (+) sign by the word Move? Click that...
See in your Team image, the sign by the Team/Move folder is (-)? That's because the folder is open. Do the same for the Unit/Move folder.
Posted by: Annihilationzh - Friday, February 6, 2009 2:48:39 PM
[quote=verbal]thats what the second picture is. None of the listed options seem to have a unit move to a specific location. on face that way. that is why i had to move the whole team at once. The script you typed is what i would like it to do. Can scripting be typed in to the editor, or must it be picked from a list. I scripted pascal for 6 years, there is very little difference from that.[/quote]
I'd pay for a world builder scripter that you could code in notepad. Unfortunately, everything has to be picked from the list.
Posted by: verbal - Friday, February 6, 2009 2:52:01 PM
wow, i feel retarded now. saw the drop down under *move didnt even notice the (+). which brought out the rest of the options. getting senile in my old age......
Posted by: Drummin - Friday, February 6, 2009 3:18:43 PM
Yes Annihilationzh, I second that. I opened and edited some scripts with notepad once before and had a major crash when trying to add those scripts back into the map. Oh Well, we work with what we've got. Verbal, I've probably got you beat on age but we won't discuss that here.
Posted by: verbal - Friday, February 6, 2009 6:26:54 PM
I also noticed in a tutorial an *and* statement to follow an *if*. I found the *or* did i overlook the *and*?
Posted by: Drummin - Friday, February 6, 2009 7:22:55 PM
"And" is the default if you add another condition.