Cannot get AutoTargetPriority to work.

Information and discussion for custom maps and mods.
Post Reply
LeonardMT
Posts: 20
Joined: Tue Jan 12, 2021 2:38 am

Cannot get AutoTargetPriority to work.

Post by LeonardMT »

Hello. I am trying to implement AutoTargetPriority to e1 but I cannot get it to work. Here is my attempt:

Code: Select all

E1:
	Inherits: ^Soldier
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	AutoTarget@AUTOTARGET:
		Priority:
			Infantry: 10
			Vehicle: 1            
	Buildable:
		Queue: Infantry
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 10
		Prerequisites: ~barracks, ~techlevel.infonly
		Description: actor-e1.description
	Selectable:
		Class: E1
	Valued:
		Cost: 100
	Tooltip:
		Name: actor-e1.name
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 5000
	Armament@PRIMARY:
		Weapon: M1Carbine
	Armament@GARRISONED:
		Name: garrisoned
		Weapon: Vulcan
		MuzzleSequence: garrison-muzzle
	WithInfantryBody:
		DefaultAttackSequence: shoot
		RequiresCondition: !parachute
	WithInfantryBody@PARACHUTE:
		StandSequences: parachute
		RequiresCondition: parachute
		Palette: player-noshadow
		IsPlayerPalette: true
	ProducibleWithLevel:
		Prerequisites: barracks.upgraded
	WithProductionIconOverlay:
		Types: Veterancy
		Prerequisites: barracks.upgraded
What am I doing wrong? Can anyone give me correct example?
Thank you.

Post Reply