fleetatks
  • fleetatks
  • 100% (Exalted)
  • Colonel Topic Starter
19 years ago
Well I've started this awile ago, occasionally adding to it what I can think of. If you have suggestions post them here.

FAQ's Table of contents. (use ctrl+F with the code to the right to skip to it)
0.Finding what you need in scripts----------- `~`
1.Making unit(s) unmanned-------------------- jkl;
2.Making unit(s) spawn later in the game----- asdf
3.Making unit(s) follow a waypoint path------ qazwsx
4.Making unit(s) move to a location---------- p;/ol.
5.Openning & editting official maps---------- zxcv



Most of these are things you do in worldbuilder with scripts, and most of them require that you go to Edit->Players->Add skirmish players.



---0.Finding what you need in scripts--- `~`

If you would read anything in this FAQ table read this First. If you just follow these easy steps you can find out how to do anything that's possible in scripts without any help. All of the things under this are basicly just telling you how to find what you want without you having to look.
The first step is to ask yourself what you want to be done? Do you want the computer to do something? Do you want something to blow up? Do you want to do something after a period of time, or after something has happenned?
After you know what you want, put it in a form that the computer will most likely understand what you want to do. For an example I chose "I want the Computer to attack the enemy's Superweapon if they build one" Which will convert to:
If
Player builds a superweapon
Then
Computer kill the superweapon.


Then to find what you need to do to actually be able to do this, use this as a reference to where stuff might be.
Folders:
Neutral - anything to do with neutral units (like a tree) or weather.
Plyrcivilian - Anything to do with the Player(s) in game that are not controlled by skirmish players.
TeamSkirmish_____ - anything to do with that particular Skirmish player. Note: scripts only work if that player is present, ex: AOD maps use the "If true, Then player loses" for all the skirmish players that they don't want to be on the map.
Others (Created teams) - Use what seems fits best.
Anything that seems like it doesn't fall into these catigories exactly usually doesn't matter which folder they are in.

Scripts lists:
Attack Priority set - Tells the Skirmish players (or the chosen enemy for single player maps) what they should attack first.
Camera - Mostly used in intro movies and cut scenes, tells the camera were to go.
Camera_ - Usually unused settings for camera.
DEBUG - Fix the game and prevent problems with map.
Map - Things that have to do with the map Ex: water, border, tech level.
Multimedia - Play songs or movies (go to unused... full screen or radar) or taunts/speech files.
Multiplayer - Announce defeat, victory, or local defeat. (good for single player maps)
Player - Things that have to do with the players that arent neutral.
Radar - Things to do with radar, ex: force radar to be enabled.
Scripting - Things that don't belong in any other script list.
Skirmish - Things to do with skirmish players&their abilities.
Skirmish Only - Tell the skirmish player weather or not he can build, or were he should move to.
Team - Things to do with teams of units/building on the map.
Unit - tell a named unit to do something, or do something with specific units.
Unused - Things that are uncommonly used, but are still able to do things that are important.
User - Flash: Used in single player missions to give hints. Input: make him able/unable to do anything. String: I have never tested this, but might have something to do with the beginning/ends of generals challenge were it tells you "you have been defeated" along with a picture.

If you can't seem to find what you need you can open another map that you have and see how they did it. See Glossary to find out how to open official maps, because they are very good references.

Now that we've done some looking we can do this 1 of 2 ways, we can set the attack priority for superweapons to a very high number, or we can tell them to attack the specific unit when it's built. So it would look something like this:

If
True

Then
Set attack priority of object (list a superweapon) to 100
Set attack priority .................
...
...

If
Player has greater then or equal to 1 object of type (list a superweapon)
** OR **
Player has greater then or equal to 1 object ......................
...
...

Then
Have player teamplayerskirmish_____ attack nearest object type of (list a superweapon)
Have player Teamplayer ......................
...
...



-----------------------------------------------------


---1.MAKING UNIT(S) UNMANNED--- jkl;

Click on each unit or building you wish to make unmanned and give it a name inside the object property box (Example: unit001)
Then go to Edit->Scripts and make a new script inside the folder "plyrcivilian" with these settings

If
'true'

Actions if true
(Make a new action and go to Unit->Status->Make unmanned)
"Make unit 'unit???' unmanned"


Click on 'unit???' and change it to the name of the unit, it should be in the list.
Copy the new actions and click Edit on the copyed action, and change the name of the unit. Repeat this until all the units have been made unmanned in the script.
(the reason you copy and edit it, is because it's faster then going to "new" each time.)


-----------------------------------------------------


--2.MAKING A UNIT SPAWN LATER IN GAME-- asdf

Place a waypoint on the map were you want your unit(s) to spawn later in the game, (place about 1 waypoint per 5 units, so they don't get stuck.) And then you can do this in one of two ways. The first method is to go to scripts and create a new script with these settings:

If
'True'

Actions if true
(Go to Scripts->Timer->Set timer to expire)
"Set timer 'Timer01' to expire in '##' seconds."


Then create another script (not action) with these settings:

If
'Timer01 has expired'

Actions if true
(Go to unit->Spawn->(Select the one that best suites you.)
(Team= Will spawn on a team, is you, and for the computer pick one like 'SkirmishAmerica' and it will spawn for the computer that is USA.) (Named= Create a named object, like if you had placed it in worldbuilder and givin it a name, so you could do soemthing to it in scripts.)
(orientation= What angle it's facing)
And pick the unit by clicking "unit/object of type '???'"

That's the first way to do it, the second is more for an AOD, if you wish to know how to do that one instead, Keep reading.

you place a waypoint on the map were you want your unit(s) to spawn later in the game, (place about 1 waypoint per 5 units, so they don't get stuck.) And then you can do this in one of two ways. The Second method is:
Go to teams, click the faction that you want to give the unit(s) to (example: SkirmishAmaerica) and create a new team. Then choose the unit(s) you want and the Number of them you want to apear each time you tell them to in scripts.

Then go to scripts and create a new script with these settings:
If
'True'

actions if true
(Go to scripts->Timer->Set timer to expire)
"Set timer 'Timer01' to expire in '##' seconds."


Then create another script (not action) with these settings:

If
"Timer01 has expired"

Actions if true
(Team->Spawn->Spawn an instance of team??? at a waypoint)
"Spawn an instance of team 'Your team name' at waypoint 'Waypoint you placed'"



-----------------------------------------------------


--3.MAKING UNIT(S) FOLLOW A WAYPOINT PATH/PATROL AN AREA-- qazwsx
Place your unit(s) were you want them to move to/patrol (perferable close together, or on the same path it leads on)
Then Place a Waypoint Path (place a waypoint then click and drag from that waypoint to new one) Note: If you want them to patrol an area forever (or until told to stop) Make the last waypoint connect to the first (or if you want them to move to an area then patrol that one put it so its connected to the waypoint you want)
Then click on one of your waypoints and in the object property box, you should see "Waypoint Labels" and 4 spaces under it. Click the first space and type in something (example: Patrol)
Then click your unit(s) and give them each a unique name. Note: Each unit needs to be on a waypoint in the path (not on the arrow) If this is not what you had in mind keep reading.

Then in scripts create a new script in plyrcivilian with these settings:

If
'True'

Then
(Go to Unit->Move->Set a specific unit to EXACTLY Follow a Waypoint path.)
"Unit exactly follow waypoint path "


Then keep doing until all the units have been set to patrol/move.


-----------------------------------------------------


--4.MAKING UNIT(S) MOVE TO A LOCATION-- p;/ol.
Place your units on the map and give them each a unique name. Place a waypoint to were you want them to move, and give it a name.

Then go into scripts and make a new script in plyrcivilian with these settings:

If
'True'

Then
(Go to Unit->Move->Move a specific unit to a location)
"Move unit to

Extra: If you want a unit to move to a waypoint, then patrol a path, then place an area around the waypoint and give it a name, then do the scripts from #3, but change the 'true' to (Unit->Area->Unit enters an area)"'Unit' enters 'area'"


-----------------------------------------------------


--5.OPENNING OFFICIAL MAPS & EDDITTING THEM-- zxcv

http://www.cnclabs.com/downloads/downloader.aspx?fileid=240 

Step 2: Run finalbig

Step 3: Click open and direct it to the zero hour directory (the standard is C:\Program Files\EA Games\Command & Conquer Generals Zero Hour)

Step 4: In the zero hour directory open the MapsZH.big file

Step 5: Go into edit and click extract/extract all

Step 6: Extract the map(s) to a folder on your desktop/

Step 7: In the maps folder will be all the official maps, move the folder of the map you want and place it in My Documents\Command and Conquer Generals Zero Hour Data\Maps

Other steps: To play online you will have to go into worldbuilder and open it, then go to to Edit->Map->Mapname(top) and delete the name of the map, this is the name that shows that it is an official map and cannot be transfered. You will also probably want to delete the scripts, waypoints, units, ect... to make it balanced. Note: You cannot make a mission map that can be played by more then one person other then an AOD.


-----------------------------------------------------



Email me if you ever need help (edited signature November 6th, 2014)
Sponsor
Kolem
  • Kolem
  • 55.25% (Neutral)
  • Private
19 years ago
hello
I want that if the AI is GLA in 7 seconds he will sell his stuff(i win)
Thank You
can u do that?