The cursor changes to reclaim cursor and harvys get in range of the crystals but nothing then happens.
Pretty sure its not the feature that is a problem.
Need a hint here.
Code: Select all
local unitName = "harvester"
local unitDef = {
buildPic = "harvester.png",
category = "TANK SMALL NOTAIR NOTSUB",
objectName = "vehicles/harvester.dae",
name = "Tiberium Harvester",
tEDClass = "TANK",
unitName = "harvester",
script = "harvester.lua",
collisionVolumeType = "box",
collisionVolumeScales = {25, 25, 50},
--collisionVolumeOffsets = {32, 32, 16},
buildTime = 140,
description = "Tiberium collector",
maxDamage = 1000,
radarDistance = 0,
sightDistance = 200,
soundCategory = "TANK",
buildCostMetal = 1400,
acceleration = 0.05,
brakeRate = 0.25,
footprintX = 3,
footprintZ = 4,
maxSlope = 20,
maxVelocity = 2.5,
maxReverseVelocity = 0.25,
maxWaterDepth = 20,
movementClass = "Default",
turnRate = 200,
turnInPlace = false,
turnInPlaceSpeedLimit = 10,
canMove = true,
leaveTracks = 1,
reclaimable = false,
capturable = false,
idleAutoHeal = 1.0, -- First C&C had no harvester self repair but its convenient so we use
explodeAs = "harvester_explosion",
sounds = {
select = {
"tone16.wav",
},
ok = {
"newtarg1.wav",
},
arrived = {
"tone2.wav",
},
},
}
if false then
unitDef.canAttack = 1
unitDef.canGuard = 1
unitDef.canFight = 1
unitDef.canPatrol = 1
unitDef.kamikaze = true
unitDef.kamikazeDistance = 100.0
unitDef.selfDestructCountdown = 3
unitDef.fireState = 1
else
unitDef.builder = true
unitDef.buildDistance = 64.0
unitDef.workerTime = 1.0
unitDef.canRestore = false
unitDef.canReclaim = true
unitDef.canBeAssisted = false
unitDef.canAssist = false
unitDef.canRepair = false
end
local weaponDefs = {
harvester_explosion = {
weapontype = "Cannon",
areaofeffect = 250,
avoidfeature = false,
avoidfriendly = true,
canattackground = true,
collidefriendly = true,
collisionsize = 8,
commandfire = false,
craterboost = 0,
cratermult = 0,
edgeeffectiveness = 0.1,
explosionspeed = 128,
impulseboost = 0,
impulsefactor = 0,
intensity = 1,
noselfdamage = false,
range = 25,
soundstart = "tnkfire3",
soundhit = "xplos",
reloadtime = 10,
rgbcolor = "1.0 1.0 1.0",
turret = false,
texture1 = "flame",
weaponvelocity = 800,
explosiongenerator = "custom:TANKGUN_FX",
damage = {
infantry = 500,
default = 500,
heavy_armor = 250,
},
},
}
unitDef.weaponDefs = weaponDefs
return lowerkeys({ [unitName] = unitDef })