MODSon[line.com] Wiki - Beta 1.0
Call of Duty 4: Single Player Vehicles
From MODSonline Wiki
Contents |
[edit] AI Vehicles in Singleplayer COD4
Using AI vehicles in Singleplayer is relatively the same as the past games in the COD series, but it has been made easier now. You no longer have to create additional soundalias when using a moving vehicle.
A moving vehicle is a script_vehicle xmodel which has a path (vehicle_nodes or origins)and has the appropirate script reference. (see below for precache)
The "shift V" method can still be used to edit and create vehicle paths along with path_nodes. (info>vehicle_node also works with helicopters)
[edit] Scripts
Precache Vehicles in "yourmapname".gsc: maps\_vehiclename::main( "vehicle_vehiclename" );
The above line should be included before loading the main scripts:
Example:
maps\_seaknight::main( "vehicle_ch46e" );
So A final script may look like:
main()
{
maps\_seaknight::main( "vehicle_ch46e" );
maps\_load::main();
}
Note, as this is singleplayer you do not need to define a player class or weapon loadout. The players weapons will be that of the default loadout.
[edit] Zone Source
After compiling and running the level, the "Update Zone_source" should have its left column updated automatically with the missing vehicle assets.
For the SeaKnight they are:
xanim,seaknight_pilot_twitch xanim,seaknight_pilot_switches xanim,seaknight_copilot_twitch xanim,seaknight_copilot_switches xanim,seaknight_copilot_idle xanim,seaknight_pilot_idle xanim,ch46_unload_4_idle xanim,ch46_unload_3_idle xanim,ch46_unload_2_idle xanim,ch46_unload_1_idle xanim,ch46_load_4 xanim,ch46_unload_4 xanim,ch46_load_3 xanim,ch46_unload_3 xanim,ch46_load_2 xanim,ch46_unload_2 xanim,ch46_load_1 xanim,ch46_unload_1 xanim,ch46_doors_close xanim,ch46_doors_open xanim,sniper_escape_ch46_rotors xmodel,vehicle_ch46e fx,explosions/large_vehicle_explosion fx,misc/aircraft_light_cockpit_red fx,misc/aircraft_light_cockpit_blue fx,misc/aircraft_light_red_blink fx,misc/aircraft_light_wingtip_green fx,misc/aircraft_light_wingtip_red
(NOTE: See the "Errors" section)
[edit] Entity Setup
In the Editor: (nothing in quotes should be used in the entity editor)
Vehicle:
| KEY | VALUE |
|---|---|
| classname | Script_vehicle |
| model | vehicle_ch46e |
| origin | (origin is created automatically) |
| script_noteworthy | (any name to define the vehicle in a script) |
| script_team | allies (allies/axis to define friendly/foe) |
| script_vehicleride | 2 (any number from 0+, used for linking ai to said vehicle) |
| script_vehiclestartmove | 0 (vehicle moves on spawn) |
| target | (usually the name of the first vehicle_path node) |
| vehicletype | seaknight |
| script_vehiclespawngroup | 0 (defines a group to spawn with of the same number) |
AI ride/drive vehicle:
| KEY | VALUE |
|---|---|
| classname | actor_ally_pilot_zach_woodland(other actors should work) |
| model | body_complete_sp_cobra_pilot_woodland_zack |
| origin | (automatic - deselect and reselct actor for updated origin) |
| script_startingposition | 0 (0= driver 1=cargo/gunner 2=cargo 3=cargo etc) |
| script_vehicleride | 2 (the number corresponds with the vehicles "vehicleride" number) |
A vehicle can be a spawner when linked via a trigger, the vehicles properties should then include.
Select the Vehicle in the editor and in the Entity Editor tick the boxes:
- Spawner
- ForceSpawn
- Undeletable
[edit] Errors
On loading the level, connecting paths or compiling reflections an error occurs: "cant load vehicle/vehiclename"
First check and update your Zone Source files. If that does not work..
The solution is to load the assest manager and using the toolbar go to "file">"open" A dialog should appear, locate your Source_data folder inside of your COD4 main directory and load the file: "vehiclesettings.gdt".
Now in the AssestManagers toolbar click on "PC Convert" and then "Current Assests Only". Aftwards recompile the reflections for your level.
[edit] Vehicle list
Vehicletype vehicle_modelname 80s_wagon1 vehicle_80s_wagon1_brn_destructible 80s_wagon1 vehicle_80s_wagon1_green_destructible 80s_wagon1 vehicle_80s_wagon1_red_destructible 80s_wagon1 vehicle_80s_wagon1_silv_destructible 80s_wagon1 vehicle_80s_wagon1_tan_destructible 80s_wagon1 vehicle_80s_wagon1_yel_destructible apache vehicle_apache apache vehicle_apache_dark blackhawk vehicle_blackhawk blackhawk vehicle_blackhawk_low blackhawk vehicle_blackhawk_low_thermal bm21 vehicle_bm21_mobile_dstry bm21_troops vehicle_bm21_mobile_bed_destructible bm21_troops vehicle_bm21_mobile bm21_troops vehicle_bm21_mobile_bed bm21_troops vehicle_bm21_mobile_cover_no_bench bm21_troops vehicle_bm21_mobile_cover"); bm21_troops vehicle_bm21_cover_destructible bm21_troops vehicle_bm21_bed_under_destructible bm21_troops vehicle_bm21_mobile_bed_destructible bmp vehicle_bmp bmp vehicle_bmp_woodland bmp vehicle_bmp_woodland_jeepride bmp vehicle_bmp_woodland_low bmp vehicle_bmp_desert bmp vehicle_bmp_thermal bmp vehicle_bmp_low bradley vehicle_bradley bus vehicle_bus_destructable cobra vehicle_cobra_helicopter cobra vehicle_cobra_helicopter_fly 80s_hatch1 vehicle_80s_hatch1_brn_destructible 80s_hatch1 vehicle_80s_hatch1_green_destructible 80s_hatch1 vehicle_80s_hatch1_red_destructible 80s_hatch1 vehicle_80s_hatch1_silv_destructible 80s_hatch1 vehicle_80s_hatch1_tan_destructible 80s_hatch1 vehicle_80s_hatch1_yel_destructible 80s_sedan1 vehicle_80s_sedan1_brn_destructible 80s_sedan1 vehicle_80s_sedan1_green_destructible 80s_sedan1 vehicle_80s_sedan1_red_destructible 80s_sedan1 vehicle_80s_sedan1_silv_destructible 80s_sedan1 vehicle_80s_sedan1_tan_destructible 80s_sedan1 vehicle_80s_sedan1_yel_destructible hind vehicle_mi24p_hind_desert hind vehicle_mi24p_hind_woodland hind vehicle_mi24p_hind_woodland_opened_door humvee vehicle_humvee_camo humvee vehicle_humvee_camo_50cal_doors humvee vehicle_humvee_camo_50cal_nodoors humvee automobile luxurysedan vehicle_luxurysedan luxurysedan vehicle_luxurysedan_test luxurysedan vehicle_luxurysedan_viewmodel m1a1 vehicle_m1a1_abrams mi17 vehicle_mi17_woodland mi17 vehicle_mi17_woodland_fly mi17 vehicle_mi17_woodland_fly_cheap mi28 vehicle_mi-28_flying mig29 vehicle_mig29_desert mig29 vehicle_av8b_harrier_jet sa6 vehicle_sa6_no_missiles_desert sa6 vehicle_sa6_no_missiles_woodland seaknight vehicle_ch46e seaknight_airlift vehicle_ch46e_opened_door small_hatchback vehicle_small_hatchback_blue small_hatchback vehicle_small_hatchback_green small_hatchback vehicle_small_hatchback_turq small_hatchback vehicle_small_hatchback_white small_hatchback vehicle_small_hatch_turq_destructible small_hatchback vehicle_small_hatch_green_destructible small_hatchback vehicle_small_hatch_turq_destructible small_hatchback vehicle_small_hatch_white_destructible small_hatchback automobile small_wagon vehicle_small_wagon_white_destructible small_wagon vehicle_small_wagon_blue_destructible small_wagon vehicle_small_wagon_green_destructible small_wagon vehicle_small_wagon_turq_destructible small_wagon vehicle_small_wagon_white small_wagon vehicle_small_wagon_blue small_wagon vehicle_small_wagon_green small_wagon vehicle_small_wagon_turq small_wagon automobile t72 vehicle_t72_tank_low t72 vehicle_t72_tank t72 vehicle_t72_tank_woodland tanker vehicle_tanker_truck_civ truck vehicle_pickup_roobars truck vehicle_pickup_4door truck vehicle_opfor_truck truck vehicle_pickup_technical uaz vehicle_uaz_hardtop_destructible uaz vehicle_uaz_light_destructible uaz vehicle_uaz_open_destructible uaz vehicle_uaz_fabric_destructible uaz vehicle_uaz_fabric uaz vehicle_uaz_hardtop uaz vehicle_uaz_open uaz vehicle_uaz_open_for_ride van vehicle_uaz_van van automobile zpu_antiair vehicle_zpu4 zpu_antiair vehicle_zpu4_low
