Secondly, how do I limit the aiming area. For example, I do not want the head of my unit, which attacks, to rotate all the way around, just to be able to sweep back and forth in a 90 degree range (45 in each direction), and some up and down limits as well.
Thirdly, how do I make a unit fps-able. I cannot fps my unit.
Fourthly, my unit will attack other units, but does no damage. Why is that? I have very minimal files so chances are something is missing somewhere.
Weapondef from unit lua:
Code: Select all
weapons = {
{
def = [[WEAPON]],
mainDir = [[0 0 1]],
maxAngleDif = 60,
},
},
weaponDefs = {
WEAPON = {
name = [[Bite]],
areaOfEffect = 8,
craterBoost = 0,
craterMult = 0,
damage = {
default = 80,
},
impulseBoost = 0,
impulseFactor = 0,
lineOfSight = true,
noSelfDamage = true,
range = 30,
reloadtime = 1.8,
tolerance = 5000,
turret = true,
WeaponType = [[Melee]],
weaponTimer = 0.1,
weaponVelocity = 500,
},
},