Machine guns

Units and their machine guns

The machine gun of each unit is defined in the unit script:

mgun        	= 	49
gun_power	=	4000

“gun_power” is the machine gun firepower. The number defines how much damage it does in one second. Note that the damage is 1/100 of the number, i.e. if gun_power = 4000 then the gun does 40 units of damage per second.

Machine guns are defined in the weapon scripts as follows:

Machine gun models

new_weapon      49
        model                   =       special
        name            =       ZIING_1     
        vp_normal       =       22
        vp_fire         =       22
        vp_dead         =       99
        vp_megadeth     =       99
        vp_wait         =       22
        vp_genesis      =       22
        shot_time_user  =       150
        shot_time       =       300
        type_icon       =       I
end

Model is always “special” for machine guns.

VP_#### entries define the graphical effects, as with any other weapon. [more information needed]

Shot times (in milliseconds) define the rate at which the effects are played.

Sound effects

The machine gun sounds, as the power, are defined per vehicle; this means that the guns itself don't have sound effects. The sound information is usually stored in a dedicated script file (usually ssnd.scr) but it can also be included in the main scripts.

For the machine gun sounds, look at this section:

	snd_fire_sample		=	sounds/mg1.wav
	snd_fire_volume		=	90

Pretty self-explaining; sample points to the sound file and volume defines the sound volume.

modding/machinegun_script.txt · Last modified: 2013/12/05 16:52 (external edit)
Back to top
CC Attribution-Noncommercial-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0