Log in

View Full Version : Script Shortcut problem



Patrizius
06-06-2008, 07:45
i want to call those shortcuts "disband" "select_all" from script..but the call_object_shortcut doesn't work.
it seems i have to specify a specific hud
example
call_object_shortcut HUD shortcut_name

any idea on what hud i have to write for those ones?

HouseOfHam
06-06-2008, 18:34
Going by preferences\keys.dat, it should be card_manager for both of them.

Patrizius
06-07-2008, 21:04
thanks a lot ;)

Patrizius
06-08-2008, 10:54
no it doesn't work :(

HouseOfHam
06-09-2008, 19:01
It would only work for the player-controlled faction. The AI doesn't use the UI.

If you post your code, I'll look over it.

Patrizius
06-10-2008, 17:25
i know thhat ;).

the code is simple

call_object_shortcut card_manager disband

i select the unit and then activate the script.NOTHING

but if i use my keyboard shortcut it works...

HouseOfHam
06-10-2008, 19:51
How do you activate the script? I wonder if the keyboard shortcut works in that context.

Patrizius
06-10-2008, 19:54
with the show_me...
normally.the other stuffs are working well.And i have tried everything(to include it in monitors and event).I'm pretty sure it depends on the sintax ;).

HouseOfHam
06-11-2008, 07:17
What events are you using to trigger it?

I believe card_manager can only be used in the context of a battle (according to https://forums.totalwar.org/vb/showpost.php?p=929325&postcount=5), where disband and select_all refer to disbanding a group and selecting all units.

If you look in the .exe, it has things like:
C:\barbi_daily\code\ui\ui_card_manager.cpp
card_manager: select, assign, orders_ungroup, orders_group, select_prev_grp, select_next_grp, dec_xp, inc_xp, disband, select_melee, select_missile, select_siege, select_infantry, select_cavalry, select_prev, select_all, select_next, deselect_all

If, for eample, your script has "suspend_during_battle on", monitors wouldn't work.

Patrizius
06-11-2008, 10:19
i understand ;)

HouseOfHam
06-11-2008, 21:18
You realize you can't disband units while in battle mode, right?...

I take it you're trying to do something related to a "loss of control over your units in battle" script, then. I suppose, you could try using kill_unit on a labeled_unit, instead.

Patrizius
06-12-2008, 01:18
no ihave already maded it ;).I was under the impression disband was refered to the unit disband in strat map,where you send home the units you select.Unfortunally it was not that one...Maybe you know which one is(and i will be vey pleased to know even the "select all card" in the strat map army )

HouseOfHam
06-12-2008, 05:59
You can't do that. :(

Patrizius
06-12-2008, 13:40
i realised it :( . Thanks for the support ;)