Statistics: Posted by Uveso — 09 Feb 2018, 00:07
Statistics: Posted by dippydoop — 08 Feb 2018, 23:24
Statistics: Posted by Uveso — 08 Feb 2018, 05:04
Statistics: Posted by dippydoop — 07 Feb 2018, 17:38
'Veteran Level '..level
Statistics: Posted by Uveso — 07 Feb 2018, 07:20
Statistics: Posted by dippydoop — 07 Feb 2018, 00:29
Statistics: Posted by Franck83 — 06 Feb 2018, 22:57
Uveso wrote:
- Code:
self:SetCustomName('Veteran Level '..level)
Statistics: Posted by dippydoop — 06 Feb 2018, 22:30
\YourMod\lua\sim\Unit.lua
-- Save the original Unit class
local oldUnit = Unit
-- Crate a new unitclass with all functions from the old Unitclass
Unit = Class(oldUnit) {
-- Noe we are overwriting the original SetVeteranLevel function.
SetVeteranLevel = function(self, level)
-- first lets call the old original SetVeteranLevel function.
oldUnit.SetVeteranLevel(self, level)
-- now we can add our own stuff
-- Maybe add a Name to the unit with Vetaran Level:
self:SetCustomName('Veteran Level '..level)
end,
}
Statistics: Posted by Uveso — 06 Feb 2018, 19:45
\lua\sim\Unit.lua
SetVeteranLevel = function(self, level)
Statistics: Posted by Uveso — 06 Feb 2018, 19:26
Statistics: Posted by dippydoop — 06 Feb 2018, 15:58
Statistics: Posted by Franck83 — 06 Feb 2018, 12:29
Statistics: Posted by dippydoop — 05 Feb 2018, 20:48
Statistics: Posted by Franck83 — 05 Feb 2018, 19:15
Statistics: Posted by dippydoop — 05 Feb 2018, 19:09