This is probably a mere question of syntax but after LOTS of trial & error I am stumped. The background is I am spawning an MG42 into a stock map. The positioning is fine, the gun operates ok, but I am unable to limit it's movement & range of fire. Look below the code for the different permutations I've tried.
Code: Select all
spawn "models/statweapons/mg42_bipod.tik" targetname "mg42_bipod" origin "544 2191 290" angles "0 -116 0"
spawn "models/statweapons/mg42_gun.tik" targetname "mg42" origin "544 2191 290" angles "0 -116 0"
local.neworigin = $mg42.origin + (0 0 15)
$mg42_bipod.origin = local.neworigin
$mg42.origin = local.neworigin
$mg42.setplayerusable=1
$mg42.pitchcaps ( -30 30 0 )
$mg42.yawcenter= -116
$mg42.maxyawoffset=49
spawning mg42_bipod_nonstatic instead
not setting the yawcenter and maxyawoffset to allow it to use the default value
using a positive value for yawcenter
entering pitchcaps, yawcenter, & offset in each combination of single variables & vectors
several different syntactical changes
and I suspect this will be a simple syntax mistake...but I figured I was just wasting time at this point, I better ask.
Thanks,
-unmonitrd
