local oldUnit=Unit
Unit = Class(oldUnit) {
OnLayerChange = function(self, new, old)
oldUnit.OnLayerChange(self, new, old)
if not EntityCategoryContains(categories.SUBCOMMANDER + categories.COMMAND, self) then
if new == 'Water' and old == 'Land' then
self:SetCustomName( 'Jesus' )
elseif new == 'Seabed' and old == 'Land' then
self:SetCustomName( 'Moses' )
elseif new == 'Land' and (old == 'Water' or old == 'Seabed') then
self:SetCustomName( '' )
end
end
end,
}
Statistics: Posted by Uveso — 22 Mar 2016, 00:49
Statistics: Posted by Uveso — 21 Mar 2016, 23:50
Statistics: Posted by Exotic_Retard — 21 Mar 2016, 21:20
OnLayerChange = function(self, new, old)
TConstructionUnit.OnLayerChange(self, new, old)
if new == 'Water' and old == 'Land' then
self:SetCustomName( 'Jesus' )
elseif new == 'Seabed' and old == 'Land' then
self:SetCustomName( 'Moses' )
elseif new == 'Land' and (old == 'Water' or old == 'Seabed') then
self:SetCustomName( '' )
end
end,
Statistics: Posted by Uveso — 21 Mar 2016, 20:25
Statistics: Posted by Mad`Mozart — 20 Mar 2016, 19:01