The above when added to the start of a scenario LUA file will add 2x Fire hero.function CreateAndAssignNewHero1(unit_id)
local hero = NewHero()
hero.portrait = "/Game/Gui/Common/Heroes/DE/de_in_11.de_in_11"
--hero.portrait = "/Game/Gui/Common/Heroes/generic_standin.generic_standin"
hero.name = NSLOCTEXT("scenario_Seville", "Volkhardt_Kautz", "Volkhardt Kautz")
hero.extra_traits = {UnitTrait.QuadripleGun}
local action = world:MakeNewHeroAction(0, hero)
world:Exec(action)
local assign_hero_action = world:MakeAssignHeroAction(0, hero)
world:Exec(action)
end
function PlayerHero()
CreateAndAssignNewHero1() -- specify id of the unit which will get this hero
end
Above shows how to add multiple trait heroes.hero.extra_traits = {UnitTrait.ArtySupport, UnitTrait.ATSupport}
Next you must open the editor and call your new function.
