Hello,
I'm preparing a scenario (Italian Alpine Corps retreat at Nikolajevka) and I'd like to add some limitations (ammo, fuel, elite replacements and prestige).
I solve the problem of the prestige starting with 0 prestige and improve it conquering Soviet flags.
For ammo, fuel and elite replacement limits, I add them in the scenario parameters, but I'm not able to write a LUA with the correct lines to visualize on the screen the amount remaining available during the battle (like air transports or navy).
I wrote this lua:
function OnMapStart()
local player = world:GetPlayer(0)
player.resource1_icon = "/Game/Gui/GameplayUI/hud_ammo_icon"
player.resource1 = AmmoPool
player.resource1_tooltip = NSLOCTEXT("common", "ammo.pool", "Ammo Pool")
UpdateAmmoPool()
player.resource2_icon = "/Game/Gui/GameplayUI/hud_fuel_pool_icon"
player.resource2 = FuelPool
player.resource2_tooltip = NSLOCTEXT("common", "fuel.pool", "Fuel Pool")
UpdateFuelPool()
player.resource3_icon = "/Game/Gui/GameplayUI/hud_elite_pool_icon"
player.resource3 = ElitePool
player.resource3_tooltip = NSLOCTEXT("common", "elite.pool", "ElitePool")
UpdateElitePool()
end
function elite_start()
local player = world:GetPlayer(0)
player.fuel = 10000
player.ammo = 700
player.elite = 70
end
function fuel_ammoupdate()
if world.round < 1 then return end
local player = world:GetPlayer(0)
player.resource1 = player.ammo
player.resource2 = player.fuel
player.resource2 = player.elite
end
I add the triggers, and only the ammo icon appears, but with the wrong amount (sometime 5, sometime 0).
Someone could help me?
Thanks
Silnac
panzer corps 2 scenario: visualization of limited supplies
Moderator: Panzer Corps 2 Moderators
Re: panzer corps 2 scenario: visualization of limited supplies
If u use the editor fields for fuel/ammo/elites(be sure to have something in both slots) u don´t need to do anything to make them show, game will do it for u.
Regarding fuel, u will notice that it becomes obsolete as soon as planes are involved.
sers,
Thomas
Re: panzer corps 2 scenario: visualization of limited supplies
[/quote][/img]
Thanks for your quick reply Grondel!
No airplanes involved. Only ground units.
I leaved the Soviet's slot empty (unlimited supplies) in scenario parameters.
I need to see the total amount and the update every turn.
It's necessary to have an immediate reference in the upper part of the screen to value if I must avoid a fight or not.
More or less like on the Kuybyshev43 scenario NHEast1943 campaign.
I attached a screenshot to explain my idea.
Thanks for your quick reply Grondel!
No airplanes involved. Only ground units.
I leaved the Soviet's slot empty (unlimited supplies) in scenario parameters.
I need to see the total amount and the update every turn.
It's necessary to have an immediate reference in the upper part of the screen to value if I must avoid a fight or not.
More or less like on the Kuybyshev43 scenario NHEast1943 campaign.
I attached a screenshot to explain my idea.
- Attachments
-
- ScreenShot_2.jpg (104.07 KiB) Viewed 454 times
Re: panzer corps 2 scenario: visualization of limited supplies
Thanks Thomas,
I'll try to find a solution.
best
Silnac
I'll try to find a solution.
best
Silnac