- Code: Select all
-----------------------------------------------------------------------------
-- File : /units/uef/ai0000/ai0000_script.lua
-- Author(s): Redmoth
-- Summary : REDAI player Central Core Script instance
-----------------------------------------------------------------------------
local StructureUnit = import('/lua/sim/StructureUnit.lua').StructureUnit
AI0000 = Class(StructureUnit) {
OnCreate = function(self, createArgs)
StructureUnit.OnCreate(self, createArgs)
if self:GetAIBrain().BrainType == 'AI' then
local thrd = self:ForkThread(self.SwitchToEngiCom)
end
end
end,
SwitchToEngiCom = function(self)
local nam = 'UUL0001'
localpos = self:GetPosition()
local unit = CreateUnitHPR(nam, self:GetArmy(), localpos[1], localpos[2], localpos[3], 0, 0, 0)
end,
}
TypeClass = AI0000
REDAI.scd/units/AI/AI0000/AI0000_unit.bp
- Code: Select all
UnitBlueprint {
Categories = {
'AI'
},
Description = '<LOC UNIT_DESCRIPTION_0103> REDAI Core',
Display = {
DisplayName = '<LOC UNIT_NAME_0206>REDAI Core',
},
General = {
UnitName = '<LOC UNIT_NAME_0207>REDAI Core',
},
}
It also has a healthbar and can be attacked, but not killed. What gives?
edit: There are no model files because I just want a completely blank object with only the unit class.