dont have ressources yet.. that could be it.. if nocost doesent give them out for free...
Code: Select all
local unitName = "sentrynell"
local unitDef = {
name = "Sentrynell",
Description = "Heavy Anti Air Defense Unit, able do deploy Sentrys",
objectName = "sentrynell.s3o",
script = "sentrynell.lua",
buildPic = "placeholder.png",
--cost
buildCostMetal = 100,
buildCostEnergy = 12,
buildTime = 5,
--Health
maxDamage = 150,
idleAutoHeal = 0,
--Movement
Acceleration = 0.25,
BrakeRate = 0.3,
FootprintX = 5,
FootprintZ = 5,
MaxSlope = 20,
MaxVelocity = 3.0,
MaxWaterDepth = 20,
MovementClass = "Default2x2",
TurnRate = 500,
sightDistance = 500,
CanAttack = true,
CanGuard = true,
CanMove = true,
CanPatrol = true,
CanStop = true,
LeaveTracks = true,
Builder = true,
ShowNanoSpray = true,
CanBeAssisted = true,
CanReclaim=true,
workerTime = 100,
buildDistance = 400,
terraformSpeed = 9001,
buildoptions =
{
"sentry",
},
Category = [[LAND]],
weapons = {
[1]={name = "MachineGun",
onlyTargetCategory = [[LAND]],
},
},
}
return lowerkeys({ [unitName] = unitDef })
The Script itself is your buildervehicel stripped down to the skelleton (removing everything moving)
I will not pretend that i understand completely what im doing. So this (s/c/h/w)ould be valid code... dont hate me knorke, i know this was supossed to be nubproof
Code: Select all
function script.Create()
end
function script.Killed()
end
--------BUILDING---------
function script.StopBuilding()
SetUnitValue(COB.INBUILDSTANCE, 0)
end
function script.StartBuilding(heading, pitch)
SetUnitValue(COB.INBUILDSTANCE, 1)
end
function script.QueryNanoPiece()
return nano
end