Need for a machine gun
In this recipe, we will do something fun with the car and attach a machine gun to the vehicle and have it be fired from the driver's seat.
Getting ready
Complete the Creating a new car XML recipe. Then open MyVehicle.xml
in Notepad or an equivalent editor. Delete the following cells from MyVehicle.xml
:
<Weapons> <Primary/> </Weapons> <ActionParts/>
How to do it...
In the cells that were just deleted (as they were obsolete), copy the following lines:
<SeatActions> <SeatAction class="Weapons"> <Weapons isSecondary="0"> <Weapons> <Weapon class="AsianCoaxialGun" part="body"> <Helpers> <Helper value="mgun_out"/> </Helpers> </Weapon> </Weapons> </Weapons> </SeatAction> </SeatActions>
How it works...
The newly added <Sea
tAction>
tag is used for any weapons that are made for the vehicles. The weapon itself...