First of all, weapon condition. Its constructed just to shoot, not to shoot-shoot at point blank range-kick shit out from imps in melee-falls from cliff-using as seat near bonfire between maps or using as oar sometime. So
Code: Select all
fire:
}if(weapon_conditions_variable >= complex_function_that_sometimes_allow_to_shoot_using_waaaagh!_field_even_if_weapon_falling_apart_in_rust_dust)
{
...
}
else(return resolvestate("fail");)
return resolvestate(null);}
Spoiler:Next, cleanliness of weapon.Its designed for operating in more-less clean conditions, not with dirt instead of lubricants and ash on barrel, which so old that see how neanderthals hunt mammoths. So
Code: Select all
if(weapon_cleanliness_variable >= some_constant_+/-_random_number)
{
...
}
else(return resolvestate("fail");)
return resolvestate(null);
Spoiler:A-a-a-nd cartridges. From this, would seem, little thing depends so much. Bad reputation of M16 thanks to its cartridge. In combat operations "effective" managers send cheap cartridge, not quality and expensive that engineers and rifle was desired. So
Code: Select all
if(random_number >= some_small_number||countinv("cartridge_checker")==1)
{
...
}
else(giveinventory("misfire", 1); return resolvestate("fail");)
return resolvestate(null);
Spoiler:And, of course, luck.
Code: Select all
if(random_number >= some_small_number)
{
finaly_a_spawnprojectile
}
else(giveinventory("misfire", 1); return resolvestate("fail");)
return resolvestate(null);
Spoiler:And now questions.
How define all weapon_X_variable for every single weapon that present on map? Create struct for every weapon? How? Now I use console variable just to check how it working.
About ammo. If player dont find automatic cartridge checker it can manualy check all cartridge in inventory, misfire chance 2 out of 93. How make one pool for checked, "good" ammo and found, doubtful ammo from deepth of hell grounds?
And about reloading. How make it looks like in gears of war? If someone dont know how it looks, after pressing reload key player have two options.
First, do nothing and wait while character simple reload weapon.
Second, try catch moment and press reload key one more time. If player catch moment, reload will happen 0.5 quicker and all missing in magazine ammo achived temporary bonus damage.
If player try and fail press key in time, magazine stuck in weapon, character start trying kick it from weapon, everything will be bad in short, and reloading take 2 time longer.