Home   Help Search Login Register  

Author Topic: Editing Essentials: A Beginners Guide  (Read 2602 times)

0 Members and 1 Guest are viewing this topic.

Hank Hill

  • Guest
Editing Essentials: A Beginners Guide
« on: 30 Aug 2002, 03:39:46 »
Hey Everyone, i got this little diddy off the old forums and found it to be a great help so i saved it to text. Would make a great sticky topic. This was originally posted by user named dirtman. Its very useful, and i've found it incredibly helpful. Hope you do too.

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

SPECIAL NOTE: YOU MUST PLACE A ; BETWEEN ALL SEPARATE CODES SO THE GAME WILL KNOW IT'S A SEPARATE COMMAND.



ADD FLAG TO FLAG POLE

First place the flag you want to use in the mission folder that you want the flag in. Then create a flagpole and place this line in the init. field:

This setflagtexture"name.jpg"

NOTE: name.jpg is the name of the flag you used.

*****************

ADD FIRE TO CAMP FIRE

Create a camp fire and place this line in the init. field:

This InFlame True

*****************

SOLDIER STAND STILL

Create a soldier and place this line in the init. field:

This switchmove "effectstandstill"

****************

SOLDIER SITTING

Create a soldier and place this line in the init. field:

This playmove "effectstandsitdown"

****************

FLARE TRAP OR ANY TRAP

Create a trigger and give it a name. In the activation field on the trigger place the below line:

light = "flare"camCreate[GetPos Triggername select 0, GetPos Triggername select 1,100]

NOTE: Replace Triggername with the name you gave your trigger. You can substitute anything for the flare1 and "flare", just make sure you place the 1 after the name as in flare1=. I use it with smoke to marke my LZ's so I know where the helo's going to land.

****************


START IN VEHICLE / HELICOPTER

To get the whole team in a vehicle/helicopter you must place the below line in the group leaders init. field:

mygroup = group this; "_x moveincargo" foreach units mygroup

For unit just place this in init field:

this moveincargo Helo

NOTE: Helo is the name of the vehicle


****************


SET HEIGHT FOR HELICOPTER/PLANE TO FLY

this FlyInHeight 150

NOTE: The 150 is 150 meters, this may be changed

****************


VEHICLE LIGHTS ON/OFF

To turn vehicle lights on and off , create a vehicle and name it, the place the below line in the init. field of the vehicle:

name action ["LIGHT ON"]

OR

name action ["LIGHT OFF"]

NOTE: name is the name you gave the vehicle.

****************


TO MAKE A HELO LAND

To make a helo land just create a helo and give it a name. Then add a waypoint to the location you want to land. In the Activation field add the following line:

Name land"land"

NOTE: Name it the name you gave the helo. This helo will shut its engines off and the
pilot will stay inside.

******************
TO MAKE A HELO LAND LONG ENOUGH FOR TROOPS TO GET OUT

To make a helo land just create a helo and give it a name. Then add a waypoint to the location you want to land and make it a Transport Unload, then add another waypoint near it and make it Move and carry on its flight plan.

NOTE: Name it the name you gave the helo.



****************



TO MAKE A HELO LAND LONG ENOUGH FOR TROOPS TO GET IN

To make a helo land just create a helo and give it a name. Then add a waypoint to the location you want to land and make it a Load, then add another waypoint near it and make it Move and carry on its flight plan. Create a unit and give it a waypoint near the helos load waypoint and make the unit's waypoint a Get In. Then sequinize the unit Get In waypoint with the helo Load waypoint.

NOTE: Name it the name you gave the helo.

********************

PLACE SOLDIERS IN A PARACHUTE

Create your soldier and name him. Then create a parachute and name it para1, insure you set its Special field as Flying. Then in the soldiers init. field add this line:

this moveindriver para1

NOTE: You will need to do this for each soldier you want to parachute (give each parachute a new name). Also if the parachute is not high enough, you can add this line to the soldier's init. field:

name FlyInHeight 100

NOTE: Name is the soldiers name and 150 is his new height in meters

****************

PLANTING MINES

Create a unit select side empty and class ammo and select Small Floating water mine. Give the mine a name. Now create a trigger and set the axis a and axis b to 1. Set the side to anybody. Set Activation WEST and Present, now place the below line in the activation field:

MineName setdammage 4


NOTE: MineName is the name you gave to your mine.

****************

PLACING A GUARD IN A TOWER

Create a tower (if useing Gunslingers addon or use existing tower on map) and then create a soldier. Place the soldier on the tower (this may take a little moving around to insure he's in the tower) and place a waypoint on the soldier and in the behavior field make it Safe, and then add this line to his init. Field:

this SetPos [GetPos this select 0, GetPos this select 1, (GetPos this select 2)+9]

NOTE: The +9 is the amount of meters that you have added to his height, you may have to adjust it a few times.


****************


PLACING A DESTROYED OBJECT

Create your object, make sure its empty or you will have a crew running around and make sure you set ammo, fuel and health/armor to zero. Then add this to the init. field:

this setdammage 0.99

****************

A DEAD BODY

Place a unit on the spot where you want a dead body. Put this line in the init. field:

this SetDammage 1

****************

CAPTURE ENEMY

First create a unit to capture and give it a name like eastcaptive. In its init. field place the below line:

this setcaptive true

NOTE: This will keep west from shooting him.

Now create a trigger and set axis a and axis b to 2 and the activation to west. Then in the
On Activation field place one of these's line:


eastcaptive switchmove "FXStandSurUniv"
eastcaptive switchmove "FXStandSurDown"
eastcaptive switchmove "FXStandSur"

NOTE: In this I used eastcaptive as the captives name, you can use any name, all you have to do is change it.

****************

SOLDIER JOIN UNIT

To get a solder to join your unit there is two ways of doing it. You can place the below line in the init field of the soldier or in the On Activation field in a waypoint.

[this] join unit name

NOTE: unit name is the name of the unit to join.


****************

PLACING A PERSON IN A HOUSE

Place a waypoint over a house and a new field shows up on the Insert Waypoint chart that is marked Position in House, this is a dropdown menu. Select what position you want and then ok. Now if you want to place more than one person in a house, first select the unit, move over the first waypoint and SHIFT + Left click over it. This will display "house" instead of the waypoint name, and then you can create the new waypoint on top of the old one.

NOTE: You can only place people in the light gray houses, these are open.

****************

HOW TO ARM CIVILANS

Create a civilian and in his init field place the below line:

this AddMagazine"AK47"; this AddWeapon"AK47"
or
this AddMagazine"M16"; this AddWeapon"M16"

****************

ENABLE/DISABLE RADIO

Sets whether the player can see and hear radio messages. Use one of the below lines in the units init field:

EnableRadio True or EnableRadio False

NOTE: This will not stop the player from sending radio messages, orders, or codes, only his ability to receive them and hear himself sending.

****************

NAMING A GROUP

To name a group, in the in the group leader's init field line, type:

GROUPNAME=group this

NOTE: Substituting GROUPNAME for whatever name you want to call the group).

****************

LINKING TWO TRIGGERS END A MISSION
To end a mission can require to triggers, this is how I do it.

Create a trigger that covers the area you want to activate the cutscene, such as a base by using the axis a & b. Then name the trigger trigger1. This will start the cutscene and in the On Activation field put trigger1done=true. Remember you must set the Activation and Present or Not Present to set this trigger off.

Create a second trigger that covers the area you want to show in your cutscene and name it trigger2. In the TYPE field place End 1, in the Condition field put this trigger1done; EndMission1 and in all 3 countdown spots put 6, if that's not enough time try 10. You can go to Effects and set camera, sound and other items.

Note: What this does is allow you to make a separate location off to another side of the island to stage the cutscene in. Do the same for all types of end mission (win, lose). Make sure you place the second trigger (trigger2) outside of trigger1's area.

****************

SALUTING

To make a unit salute, place the below in the init field:
yourunit switchmove "EffectStandSalute"
playmove "EffectStandSalut"
NOTE: yourunit is the name you gave the solder

****************

REMOVING WEAPONS AND EQUIPMENT

To remove a weapon use the below line in the units init field:
this removeweapon "ak74"
NOTE: You will need to use the above chart to find the correct weapon to remove.

****************

TRIGGER UNIT TO START MOVEMENT

Create a trigger of where you want the WEST to be detected. Place WEST in the Activations section and select Present.
Create the unit you want to detect them, then double click on the unit this will set up the first waypoint exactly where the unit is located, set up the rest of the waypoints.
Next select synchronization and drag a line from the trigger to the first waypoint you made for the unit,
Now the unit will wait until the trigger conditions are met before he does anything.

****************

PLACING OBJECTS ON TABLES AND HIGHER ALTITUDES

Create a object and in its init field place the below line:
this setpos [getpos this select 0, getpos this select 1, (getpos this select 2)+1]
NOTE: The +1 is an additional meter in height; you can change this to suite.

****************

PLACING A HINT ON THE SCREEN

If you want to place a message on the screen create a waypoint and in the On Activation field place the below:
Hint "Move to the next waypoint!"
NOTE: The message can be what you want and it will be there till you reach the next waypoint.
OR
If you want a temporary message on the screen create a waypoint and in the On Activation field place the below:
Hintc"Don't forget the hostages"
NOTE: This will halt the game till you press a button.

****************

MAKING A GURAD STAND IN PLACE AND FIRE

You want a guard to stand his ground and not run…. place the below in his init. field:
this setbehaviour "SAFE"; this SetCombatMode "YELLOW"

The command "this setbehaviour "SAFE"" makes the player stand with his gun on his back, as if there were no hostile presence. And the command "this SetCombatMode "YELLOW"" makes the player open fire at will, but he won't leave his position (I think that's what you were getting at).

NOTE: When you use "this" for the command you are calling for the actual entity you are working on. For example if you change the soldiers name to "aP" then you could also use "aP setbehaviour "SAFE" and it would work just the same. And because there are two commands used there, you seperate them with ";"

****************

KEEP A UNIT FROM FLEEING

To keep a unit from fleeing the battle field you need to put the below line in the unit init field:

this allowfleeing 0
NOTE: Unit will not flee the scene
this allowfleeing 1
NOTE: Unit will flee if it wants to

****************

GET UNIT TO PATROL

Just put in each init fields of the units of your team:
this setbehaviour "SAFE";this setspeedmode "LIMITED"
then simply make a waypoint series with the last waypoint "cycle" over a previous one (it'll create the loop).
Ensure you have for each WP "no change" in the speed and behavior fields in order to keep them alert if they are attacked or detect an enemy.

****************

GET A UNIT TO AIM AT ANOTHER UNIT

Someone DoTarget Someone_Else
GET A UNIT TO FIRE AT ANOTHER UNIT
Unit1 DoFire Unit2

****************

HOW TO GET GROUND UNITS ONLY TO TRIP A TRIGGER

This is a trigger setup so it can only be triggered from ground, not in a chopper.

Trigger activated by west with these conditions;

this and not ((chop1) in thislist)
this and not ((chop1) in thislist) and not ((chop2) in thislist)

First one is for one chopper, second for two.
My actual line for one with 6 choppers is,

expCond=this and not((chop10) in thislist)and not((chop11) in thislist)and not((chop20) in thislist)and not((chop21) in thislist)and not((chop22) in thislist)and not((chop23) in thislist)"

****************


ADDING WEAPONS TO AMMO CREATES

Create a ammo create and add this to the init. field:

this addweaponcargo ["M16",6] (NOTE: This will add 6 M-16 rifles)

this addmagazinecargo ["M16",12] (NOTE: This will add 12 M-16 magazines)

*********************

DISPLAYING MULTI LINED TEXT IN HINT

When editing text for hints there is a little command that is used to start a new line. The command is /n . Below is and example:

Hint"Mother 1, we are ready for pickup/nMother 1 we are on our way…"

This will be displayed on the screen as:

Mother 1, we are ready for pickup
Mother 1 we are on our way….

********************




Thanks To Dirtman for putting this together so long ago, all of the people new to editing should save this and use it often.  ;D
« Last Edit: 30 Aug 2002, 03:43:22 by Hank Hill »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Editing Essentials: A Beginners Guide
« Reply #1 on: 30 Aug 2002, 05:17:20 »
bout da land units trigering thing  ;D

dereis a beter way just put in da condition

"Land" counttype thislist > 0

LCD OUT

[edit] damn i keep forgetin da counttype  ::)  ;D

« Last Edit: 30 Aug 2002, 17:56:30 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Davies1

  • Members
  • *
  • Bugger this for a game of soldiers!
Re:Editing Essentials: A Beginners Guide
« Reply #2 on: 30 Aug 2002, 17:15:55 »
I trust you know what you are doj g lcd mate but I have always used

("land" counttype thislist) > 0
Beer is the fuel for the Heavy Metal Engine.