find location of fields and units in editor

A new story begins...
The sequel to a real classic: Panzer Corps is back!

Moderator: Panzer Corps 2 Moderators

Post Reply
spotlight2001
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 44
Joined: Thu Oct 15, 2020 8:53 pm

find location of fields and units in editor

Post by spotlight2001 »

Hi,

in editor for "operationblue" I have checked "triggers" and found references to .lua file:

Code: Select all

units1 = {64,54,63,56,62,58,61,55,59,57,60}

function AttackCondition1()
	flag1 = world:GetHex({17,3})
	return flag1.owner == 0 
end

function AttackEffect1()
	for _, unit_id in ipairs(units1) do
		local unit = world:GetUnit(unit_id) 
		if (unit ~= nil) then
			local orders = Copy(unit.orders) 
			table.remove(orders, 1) 
			unit.orders = orders 
		end
	end
end
In editor how can I find unit 64?
In editor how can I find hex{17,3}?
VirgilInTheSKY
Major - Jagdpanther
Major - Jagdpanther
Posts: 1026
Joined: Wed Dec 18, 2019 4:26 pm

Re: find location of fields and units in editor

Post by VirgilInTheSKY »

Hover over a hex to get its number at bottom left corner. Select a unit (switch to Unit Configuration or whatever it is called precisely) to see its number in the configuration panel.
Grondel
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1919
Joined: Mon Aug 04, 2014 10:07 pm

Re: find location of fields and units in editor

Post by Grondel »

spotlight2001 wrote: Sat Jan 13, 2024 1:18 pm In editor how can I find unit 64?
The units number is displayed at the bottom of the screen as well, next to the hex cords.
sadly there is no way to reverse search for unit 64, u have to mouse over each unit until u find it.
Image

sers,
Thomas
Post Reply

Return to “Panzer Corps 2”