[en] - Modding Corner > Coding
Removing the requirements for a unit.
jiraiyathegallent:
Hello everyone I added mirkwood fighters to a building but i need help Removing the requirements to recruit them any help will be great thanks. :)
Ealendril der Dunkle:
Edit the following commandbutton:
--- Code: ---CommandButton Command_ConstructLothlorienMirkwoodFighterHorde
Command = UNIT_BUILD
Object = LothlorienMirkwoodFighterHorde
Options = NEED_UPGRADE CANCELABLE
TextLabel = CONTROLBAR:LothlorienMirkwoodFighterHorde
ButtonImage = HSMirkwoodSword
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipBuildLothlorienMirkwoodFighterHorde
Radial = Yes
InPalantir = Yes
ShowProductionCount = Yes
NeededUpgrade = Upgrade_RaiseSchmiedekunst
DisableOnModelCondition = RUBBLE POST_RUBBLE
End
--- Ende Code ---
Your button should look like this:
--- Code: ---CommandButton Command_ConstructLothlorienMirkwoodFighterHorde
Command = UNIT_BUILD
Object = LothlorienMirkwoodFighterHorde
Options = CANCELABLE
TextLabel = CONTROLBAR:LothlorienMirkwoodFighterHorde
ButtonImage = HSMirkwoodSword
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipBuildLothlorienMirkwoodFighterHorde
Radial = Yes
InPalantir = Yes
ShowProductionCount = Yes
End
--- Ende Code ---
jiraiyathegallent:
sorry i shouldve been more specific its for a map.ini and the code doesnt work im guessing because its for the mirkkwoodfighter.ini
Ealendril der Dunkle:
Yes, copy the changed code in your map.ini and everything should work. A commandbutton doesnt have anything to do with the ini of an unit.
jiraiyathegallent:
it doesnt work just to be sure is this right?
--- Code: ---CommandSet GondorRangerTentsCommandSetNew
1 = Command_ConstructLothlorienMirkwoodFighterHorde
2 = Command_ConstructLothlorienMirkwoodSpearmenHorde
3 = Command_ConstructLothlorienMirkwoodArcherHorde
4 = Command_ConstructMirkwoodElkriderHorde
6 = Command_Sell
End
Object GondorRangerTents
CommandSet = GondorRangerTentsCommandSetNew
End
CommandButton Command_ConstructLothlorienMirkwoodFighterHorde
Command = UNIT_BUILD
Object = LothlorienMirkwoodFighterHorde
Options = CANCELABLE
TextLabel = CONTROLBAR:LothlorienMirkwoodFighterHorde
ButtonImage = HSMirkwoodSword
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipBuildLothlorienMirkwoodFighterHorde
Radial = Yes
InPalantir = Yes
ShowProductionCount = Yes
End
--- Ende Code ---
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln