This script makes the campaign map camera jump to the location of a specific character. NOTE: it only works for the player's faction, not AI characters.
This script uses the zoom button on the character's detail scroll. All it needs is the name of the character - "Boromir" in this example...
I couldn't figure out how to show the character scroll directly. So it first shows a settlement scroll which, after selecting the character, switches to showing the character scroll. Then it auto-clicks that scroll's zoom button. Finally it closes the scroll by hiding and reshowing the UI (I couldn't figure out how to close a scroll either).Code:call_object_shortcut strat_ui capital_zoom select_ui_element construction_button simulate_mouse_click lclick_up select_character Boromir select_ui_element garrison_info_zoom_to_button simulate_mouse_click lclick_up hide_ui show_ui
To show the settlement scroll it selects the faction capital and then auto-clicks the Construction button. I guess that other scrolls could work here but I didn't try it.
garrison_info_zoom_to_button - not a typo. For some reason (bug?) this works but character_info_zoom_to_button does not.
This method works wherever the character is:
- commanding an army
- in an army commanded by someone else
- in a settlement
- in a fort
- on a ship
Only in situation 1) will he be 'physically' selected, i.e. his character icon highlighted and his movement range displayed. For example...
Attachment 245923
...the left is the outcome of this script, the right is how it would be if I had manually selected him.
Also, the camera will not be centered on his location, it will be to the right of him. This is because the zoom button puts him in the center of the left half of the screen, the right half being taken up by the scroll. As shown here...
Attachment 245927
Naturally the duplicate name problem still applies. If there are two Boromirs in the player's faction then this script might be zooming to the wrong one.




Reply With Quote







































