Vehicles
Moderator: Moderators
-
Alpha
Vehicles
What fields need to be filled out in the properties for the com_itm_vehicle_spawn for a vehicle to spawn?
- General_Grievous_4
- Rebel Sergeant

- Posts: 214
- Joined: Sun Mar 26, 2006 10:07 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
RE: Vehicles
This should explain it.
In this section I’ll go over (as promised) the process of adding a vehicle into your map.
Open Zero Editor, and open your map. (Remember to run zero editor from inside your mod directory, \BF2_ModTools\data_ABC\zeroeditor.exe )
The first thing you need to understand about adding vehicles to your level is that all vehicles are added with the same object in the editor. With that in mind, let’s continue. J
First, you’ll need to go to Object edit mode. Once in object edit mode, click on Browse as pictured below:
This will open the browse window. Browse to \BF2_ModTools\data_ABC\common\odfs\com_item_vehicle_spawn.odf
Once you select this object, you will be brought back to the Object edit mode. To place the vehicle spawn, click on Place and simply click on the terrain where you want to place your vehicle spawn. You should now have an object in your level that looks like this:
This is your vehicle spawn. The arrow indicates which direction the vehicle will be facing when it spawns in.
Select your vehicle spawn (click Select and then click on the vehicle spawn) and you’ll see the Object Instance box appear to the right. It looks something (exactly like, actually) this:
The first parameter, ControlZone refers to what CP this vehicle is associated to. The value that should be entered here is the name of the CP, NOT THE NAME OF THE CONTROL REGION, that you want this vehicle to be associated to. For example, cp1, or cp5. NOT cp1_control, or cp5_control.
The second parameter specifies how many of these vehicles you want to spawn from this vehicle spawn. I recommend always keeping this set to 1, and just add more vehicle spawns if you want more vehicles at a given CP.
ExpireTimeEnemy specifies how long a vehicle will sit idle, un-manned once the enemy has taken over the associated CP, before the vehicle will begin to decay.
ExpireTimeField specifies how long a vehicle will sit idle, un-manned in the field once it has left it’s control region.
DecayTime specifies how long a vehicle will take to decay and self-destruct once the expire time has been reached.
The vehicle that will spawn from this vehicle spawn is determined by what you enter in the Class fields. For example, if you wanted this vehicle spawn to spawn a rebel combat speeder when the rebels own this CP, you would enter all_hover_combatspeeder into the ClassAllATK field. This is assuming that the rebels are set as team 1. Whether a team is ATK or DEF is determined by what team they are set as. ATK will spawn vehicles when that team is set as team 1, DEF will spawn vehicles if that team is set as team 2.
Note: 2 values that are no longer used are ClassHisATK and ClassHisDEF. Entering values in this field will accomplish nothing, so….just don’t bother.
If you click Page DN you’ll see that there are more Class fields. As another example, if you want this vehicle spawn to spawn an ATST on a map where the rebels are team 1, and the empire is team 2, then you would click Page DN and enter imp_walk_atst into the ClassImpDEF field.
You can also have vehicle spawns spawn vehicles when either team owns the CP. If this is the case, you could enter both all_hover_combatspeeder under ClassAllATK AND imp_walk_atst under ClassImpDEF.
Additionally, you can use a vehicle spawn to spawn vehicles for both eras, you just need to specify the vehicle classes in the corresponding Class parameters.
In this section I’ll go over (as promised) the process of adding a vehicle into your map.
Open Zero Editor, and open your map. (Remember to run zero editor from inside your mod directory, \BF2_ModTools\data_ABC\zeroeditor.exe )
The first thing you need to understand about adding vehicles to your level is that all vehicles are added with the same object in the editor. With that in mind, let’s continue. J
First, you’ll need to go to Object edit mode. Once in object edit mode, click on Browse as pictured below:
This will open the browse window. Browse to \BF2_ModTools\data_ABC\common\odfs\com_item_vehicle_spawn.odf
Once you select this object, you will be brought back to the Object edit mode. To place the vehicle spawn, click on Place and simply click on the terrain where you want to place your vehicle spawn. You should now have an object in your level that looks like this:
This is your vehicle spawn. The arrow indicates which direction the vehicle will be facing when it spawns in.
Select your vehicle spawn (click Select and then click on the vehicle spawn) and you’ll see the Object Instance box appear to the right. It looks something (exactly like, actually) this:
The first parameter, ControlZone refers to what CP this vehicle is associated to. The value that should be entered here is the name of the CP, NOT THE NAME OF THE CONTROL REGION, that you want this vehicle to be associated to. For example, cp1, or cp5. NOT cp1_control, or cp5_control.
The second parameter specifies how many of these vehicles you want to spawn from this vehicle spawn. I recommend always keeping this set to 1, and just add more vehicle spawns if you want more vehicles at a given CP.
ExpireTimeEnemy specifies how long a vehicle will sit idle, un-manned once the enemy has taken over the associated CP, before the vehicle will begin to decay.
ExpireTimeField specifies how long a vehicle will sit idle, un-manned in the field once it has left it’s control region.
DecayTime specifies how long a vehicle will take to decay and self-destruct once the expire time has been reached.
The vehicle that will spawn from this vehicle spawn is determined by what you enter in the Class fields. For example, if you wanted this vehicle spawn to spawn a rebel combat speeder when the rebels own this CP, you would enter all_hover_combatspeeder into the ClassAllATK field. This is assuming that the rebels are set as team 1. Whether a team is ATK or DEF is determined by what team they are set as. ATK will spawn vehicles when that team is set as team 1, DEF will spawn vehicles if that team is set as team 2.
Note: 2 values that are no longer used are ClassHisATK and ClassHisDEF. Entering values in this field will accomplish nothing, so….just don’t bother.
If you click Page DN you’ll see that there are more Class fields. As another example, if you want this vehicle spawn to spawn an ATST on a map where the rebels are team 1, and the empire is team 2, then you would click Page DN and enter imp_walk_atst into the ClassImpDEF field.
You can also have vehicle spawns spawn vehicles when either team owns the CP. If this is the case, you could enter both all_hover_combatspeeder under ClassAllATK AND imp_walk_atst under ClassImpDEF.
Additionally, you can use a vehicle spawn to spawn vehicles for both eras, you just need to specify the vehicle classes in the corresponding Class parameters.
-
Xavious
- Sith Master

- Posts: 2783
- Joined: Mon Jun 12, 2006 3:46 pm
RE: Vehicles
read the documentation that came with the tools.
-
Alpha
RE: Vehicles
I did. And it didn't fix my problem. I've read them twice. I think it's a problem with my LUA, I sent Teancum a PM, so just ignore this topic now.
- General_Grievous_4
- Rebel Sergeant

- Posts: 214
- Joined: Sun Mar 26, 2006 10:07 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
RE: Vehicles
Make sure the vehicle is called for in the corrct LUA and on the correct side.
