Specialist
Master Knight
Thanks Caba.
Certainly. You'd need to edit script_cf_reinforce_party. Then either have a special party template set up, or otherwise add troops.FrisianDude said:Is it possible to give a certain lord a different army than his peers in the same faction? A certain lord with only cavalry would be nice for certain factions, for one.
Quite possibly.FrisianDude said:Also, would giving a lord guarantee_ranged make him join his archers?
Somebody said:Read the comments before the start of the list of animations. You can't add new ones to the bottom.
(multiplayer_get_my_player, ":player"),
(player_get_agent_id, ":agent", ":player"),
Somebody said:init_player_global_variables won't work in multiplayer - use this instead
For the sound overlap, use a global or something inside the event to track whether a sound is already playing - make the interval equal to the duration of the sound and reset the variable in the consequence.Code:(multiplayer_get_my_player, ":player"), (player_get_agent_id, ":agent", ":player"),
DOMA_ said:Somebody said:init_player_global_variables won't work in multiplayer - use this instead
For the sound overlap, use a global or something inside the event to track whether a sound is already playing - make the interval equal to the duration of the sound and reset the variable in the consequence.Code:(multiplayer_get_my_player, ":player"), (player_get_agent_id, ":agent", ":player"),
Many thx!
I didn't test it yet(I'll do later), but maybe it will work..?
Voice_order = [
(0, 0, 5, [], [
(multiplayer_get_my_player, ":player"),
(player_get_agent_id, ":my_agent", ":player"),
(agent_is_alive, ":my_agent"),
(try_begin),
(game_key_clicked, gk_infantry_hear),
(multiplayer_send_int_to_server,multiplayer_event_sound_at_player, "snd_call_infantry"),
(else_try),
(game_key_clicked, gk_archers_hear),
(multiplayer_send_int_to_server,multiplayer_event_sound_at_player, "snd_call_missile"),
(else_try),
(game_key_clicked, gk_cavalry_hear),
(multiplayer_send_int_to_server,multiplayer_event_sound_at_player, "snd_call_cavalry"),
(else_try),
(game_key_clicked, gk_everyone_hear),
(multiplayer_send_int_to_server,multiplayer_event_sound_at_player, "snd_call_all"),
(try_end),
]),
(0, 0, 3, [(key_clicked, key_m)], [ #call_horse_trigger
(multiplayer_is_server),
(multiplayer_get_my_player, ":player"),
(player_get_agent_id, ":my_agent", ":player"),
(agent_is_alive, ":my_agent"),
(agent_get_position, pos0, ":my_agent"),
(multiplayer_send_int_to_server,multiplayer_event_sound_at_player, "#user sound" ),
(try_for_agents, ":cur_agent"),
(agent_is_non_player, ":cur_agent"),
(neg|agent_is_human, ":cur_agent"),
(agent_is_alive, ":cur_agent"),
(agent_get_position, pos1, ":cur_agent"),
(try_begin),
(get_distance_between_positions_in_meters, ":distance_to_target_pos", pos0, pos1),
(lt, ":distance_to_target_pos", 30),
(agent_set_scripted_destination, ":cur_agent", pos0, 0),
(display_message,"@You whistle for your horse."),
(else_try),
(display_message,"@It's too far to get a horse."),
(try_end),
(try_end),
]),
]
At least part of your problem is running that operation on the client - that sort of thing (affecting what other players see) must be run on the server. Besides that, the operation might need some extra things done for it to work: I think it's mainly used in native single player for tutorial scenes and other peaceful things, and it might be overridden by the multiplayer battle AI; I would start by searching for it in the native code, then try copy how it is used, changing gradually to the way you want to use it, so the problem is more obvious.DOMA_ said:But, the problem is the tuple : '(agent_set_scripted_destination, ":cur_agent", pos1, 1),' seems not work. And neither '(agent_set_scripted_destination, ":cur_agent", pos1, 0),' does.