• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

unmerged(12743)

Sergeant
Dec 15, 2002
96
0
Visit site
I am having a problem directing tward a specific unit. I want to use the "value = [unit id]" variable, but nothing I try seems to work but the "-1" option for random selection. I want to directly point to a specific unit. As you set up divisions with "id = { type = [number] id = [number] } " it should be possible. Has anyone had success using this form of the command, or did I find another "Bug" in the HOI engine.

All help in this area will be greatly appreciated. If anyone at Paradox can assist, maybe it's the format of the variable I have wrong. I'm a retired programmer, so maybe I can help iron out a few bugs.
 
Upvote 0

jdrou

Field Marshal
74 Badges
Jun 10, 2002
24.161
461
  • Stellaris: Federations
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Paradox Order
  • Stellaris: Digital Anniversary Edition
  • Humble Paradox Bundle
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: El Dorado
  • Europa Universalis III: Collection
  • Europa Universalis III: Chronicles
  • 500k Club
  • 200k Club
  • Europa Universalis IV: Dharma Pre-order
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Stellaris: Megacorp
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Deus Vult
  • Darkest Hour
  • Crusader Kings II
  • Hearts of Iron II: Armageddon
  • Arsenal of Democracy
  • Hearts of Iron Anthology
  • Victoria 2
  • Rome Gold
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III
  • For The Glory
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Stellaris: Galaxy Edition
I don't know if anyone has gotten unit-affecting commands to work by specifying unit ids. It may use 'corp' id rather than 'division' id. There doesn't seem to be any way to specify the type in addition to the id and ids are only unique for a given type. There is no way to read the id of a unit so you could only affect those that were created at the start of the scenario and they may no longer exist when the event fires. For practical purposes the only way to use unit-affecting event commands is with random units (and those only seem to affect corps created during the game i.e. usually type = 4712).