Scroll down until you find where it says SetReinforcementCount(self.teamATT, -1)
Code: Select all
ScriptCB_DoFile("Objective")
--NOTE: ObjectiveSpaceAssault is a special case objective that is designed for multiplayer only
ObjectiveSpaceAssault = Objective:New
{
--external values that must be supplied when creating a new objective
shipBitmapATT = nil,
shipBitmapDEF = nil,
shieldBitmapATT = nil,
shieldBitmapDEF = nil,
criticalSystemBitmapATT = nil,
criticalSystemBitmapDEF = nil,
systemsList = {},
}
function ObjectiveSpaceAssault:OnCriticalSystemDestroyed(name, pointValue)
--designers, override me as necessary!
print("TEST - critical system destroyd:", name, "pointValue:", pointValue) --TODO: remove this line
end
-- name: the name of the object in the level (duh)
-- pointValue: how many points the object is worth when it's destroyed
-- hudPosX, hudPosY: texture coordinates for placing the hud health indicator for the critical system
-- (should be in the range of 0.0 to 1.0)
function ObjectiveSpaceAssault:AddCriticalSystem(name, pointValue, hudPosX, hudPosY)
if hudPosX and hudPosY then
--add the critical system as normal
SpaceAssaultAddCriticalSystem(name, pointValue, hudPosX, hudPosY)
else
--add the critical system, but tell C++ not to display a HUD marker
SpaceAssaultAddCriticalSystem(name, pointValue, -1.0, -1.0, false)
end
OnObjectKillName(
function (objectPtr, killer)
self:OnCriticalSystemDestroyed(name, pointValue)
AddSpaceAssaultDestroyPoints(killer, GetEntityName(objectPtr))
SetProperty(objectPtr, "MaxHealth", 99999999999.0) --effectively makes the object un-repairable
self:UpdateObjectiveMessage(name)
end,
name
)
end
function ObjectiveSpaceAssault:Start()
--=======================================
-- Initialization logic
--=======================================
assert(self.multiplayerRules == true, "ObjectiveSpaceAssault is intended for multiplayer gametypes only! (i.e. set multiplayerRules = true)")
self.showTeamPoints = true
--initialize the base objective data
Objective.Start(self)
--notify C++ that we're running space assault now
--(so it can do team scoring with critical systems and whatnot)
SpaceAssaultEnable(true)
SpaceAssaultSetupBitmaps(self.shipBitmapATT, self.shipBitmapDEF,
self.shieldBitmapATT, self.shieldBitmapDEF,
self.criticalSystemBitmapATT, self.criticalSystemBitmapDEF)
SetReinforcementCount(self.teamATT, -1)
SetReinforcementCount(self.teamDEF, -1)
Just above that you'll find this:
Code: Select all
SpaceAssaultSetupBitmaps(self.shipBitmapATT, self.shipBitmapDEF,
self.shieldBitmapATT, self.shieldBitmapDEF,
self.criticalSystemBitmapATT, self.criticalSystemBitmapDEF)
Code: Select all
SpaceAssaultSetupBitmaps(self.shipBitmapDEF, self.shipBitmapATT,
self.shieldBitmapDEF, self.shieldBitmapATT,
self.criticalSystemBitmapATT, self.criticalSystemBitmapDEF)
I've added how the fix the other messed up stuff.