Hi everyone,
I wanted to put some cannons to a scene of my new historical battles, just as decoration, in addition to that, some gunner soldiers on each side of them and fix them in stand_staff position.
I have tried many things, but they do not work very well, other people have helped me, but I cannot do it well.
I have tested these 3 triggers in the new Historical Battles mission (which is a copy of lead_charge), one at a time and also combined. I put the bots through a script (a modified copy of prepare_town_to_fight), then I put the soldiers through direct, group and individual entry points.
The first trigger works well, but you have to remove the category of soldier, that is, if he is an ally or an enemy (mtef_team_0), in addition, you have to add an item, which does not work as a weapon, only as decoration (part of the code dedal_tavern_animations) So even if the battle ends, whoever the victor is, they will still be alive because they cannot be killed.
The second trigger, I freeze the soldiers in the place I put them, but they move a lot, they want to run, they move to the left, right, it's as if they were dancing.
The third, simply, does not work, the gunners behave like any of the other soldiers and advance to the side, in front of the gun and it does not look good, because the idea is that they are in their positions, handling the artillery.
Anyone who has an idea of how to solve this problem and can help me with this, I would greatly appreciate it.
First Triggers
Second Triggers
Third Triggers
I wanted to put some cannons to a scene of my new historical battles, just as decoration, in addition to that, some gunner soldiers on each side of them and fix them in stand_staff position.
I have tried many things, but they do not work very well, other people have helped me, but I cannot do it well.
I have tested these 3 triggers in the new Historical Battles mission (which is a copy of lead_charge), one at a time and also combined. I put the bots through a script (a modified copy of prepare_town_to_fight), then I put the soldiers through direct, group and individual entry points.
The first trigger works well, but you have to remove the category of soldier, that is, if he is an ally or an enemy (mtef_team_0), in addition, you have to add an item, which does not work as a weapon, only as decoration (part of the code dedal_tavern_animations) So even if the battle ends, whoever the victor is, they will still be alive because they cannot be killed.
The second trigger, I freeze the soldiers in the place I put them, but they move a lot, they want to run, they move to the left, right, it's as if they were dancing.
The third, simply, does not work, the gunners behave like any of the other soldiers and advance to the side, in front of the gun and it does not look good, because the idea is that they are in their positions, handling the artillery.
Anyone who has an idea of how to solve this problem and can help me with this, I would greatly appreciate it.
First Triggers
Code:
bt_gunners_animations = (
ti_on_agent_spawn,1,0,[
(store_trigger_param_1,":agent"),
(agent_get_troop_id,":troop",":agent"),
(try_begin),
(is_between,":troop",artillero_inicio,artillero_fin),
(try_begin),
(agent_has_item_equipped,":agent","itm_dedal_ramrod"),
(agent_set_stand_animation, ":agent", "anim_stand_staff"),
(agent_set_animation, ":agent", "anim_stand_staff"),
(try_end),
(store_random_in_range,":r",0,120),
(agent_set_animation_progress,":agent",":r"),
(try_end),
],[])
Code:
##################### fix gunners #########################
(ti_on_agent_spawn, 0, 0, [],
[
(store_trigger_param_1, ":agent_no"),
(agent_get_troop_id, ":troop_no", ":agent_no"),
(try_begin),
(is_between, ":troop_no", artillero_inicio, artillero_fin),
(agent_set_no_dynamics, ":agent_no", 1),
(try_begin),
(agent_set_stand_animation, ":agent_no", "anim_stand_staff"),
(agent_set_animation, ":agent_no", "anim_stand_staff"),
(try_end),
(try_end),
]),
Code:
(0, 0, 0, [],
[
(try_for_agents, ":agent"),
(agent_is_alive, ":agent"),
(agent_is_human, ":agent"),
(agent_get_troop_id, ":troop", ":agent"),
(try_begin),
(eq, ":troop", "trp_artillero1"),
(entry_point_get_position, pos2, 45),
(agent_set_scripted_destination_no_attack, ":agent", pos2, 1),
(else_try),
(eq, ":troop", "trp_artillero2"),
(entry_point_get_position, pos2, 46),
(agent_set_scripted_destination_no_attack, ":agent", pos2, 1),
(else_try),
(eq, ":troop", "trp_artillero3"),
(entry_point_get_position, pos2, 47),
(agent_set_scripted_destination_no_attack, ":agent", pos2, 1),
(else_try),
(eq, ":troop", "trp_artillero4"),
(entry_point_get_position, pos2, 48),
(agent_set_scripted_destination_no_attack, ":agent", pos2, 1),
(else_try),
(eq, ":troop", "trp_artillero5"),
(entry_point_get_position, pos2, 49),
(agent_set_scripted_destination_no_attack, ":agent", pos2, 1),
(else_try),
(eq, ":troop", "trp_artillero6"),
(entry_point_get_position, pos2, 50),
(agent_set_scripted_destination_no_attack, ":agent", pos2, 1),
(try_end),
]),