fix bots on a moving ship

Users who are viewing this thread

hello everyone, hopefully you can help me ....
I have configured the naval battle with several triggers, and one of those is the one that fixes the bots for about 50 seconds before they move to attack, I had no problems until I discovered a couple of days ago that I did not receive the notifications of deaths in battle, and the cause of that was that trigger. I don't really know why that happens, but I already checked it by checking and adding the triggers one by one. I have tried several options, but neither does the 2 things ... either it fixes the bots and there are no notifications or there are, but it does not fix the bots.
the options i tried are as follows:

Code:
################ ordenes defensores #####################
(0, 0, ti_once, [
#    (try_begin),
        (team_give_order, 0, grc_everyone, mordr_hold),
        (store_mission_timer_a,":mission_time"),
        (ge,":mission_time",50),
#        (set_party_battle_mode),
        (team_give_order, 0, grc_archers, mordr_stand_ground),
        (team_give_order, 0, grc_infantry, mordr_stand_ground),
        (team_give_order, 0, grc_cavalry, mordr_stand_ground),
        (team_give_order, 0, grc_heroes, mordr_stand_ground),
#        (try_end),
        ], []),

(0, 0, 0, [
#    (try_begin),
        (team_give_order, 1, grc_everyone, mordr_hold),
        (store_mission_timer_a,":mission_time"),
        (ge,":mission_time",50),
#        (set_party_battle_mode),
        (team_give_order, 1, grc_archers, mordr_charge),
        (team_give_order, 1, grc_infantry, mordr_charge),
        (team_give_order, 1, grc_cavalry, mordr_charge),
        (team_give_order, 1, grc_heroes, mordr_charge),
#        (try_end),
        ], []),

(0, 0, 0, [
#        (try_begin),
        (store_mission_timer_a,":mission_time"),
        (ge,":mission_time",88),
        (team_give_order, 0, grc_archers, mordr_charge),
        (team_give_order, 0, grc_infantry, mordr_charge),
        (team_give_order, 0, grc_cavalry, mordr_charge),
        (team_give_order, 0, grc_heroes, mordr_charge),
#        (try_end),
        ], []),

As it is, it fixes the bots for me, for 50 seconds, but the notifications do not appear, if I add try_begin and try_end, it does the opposite, if I remove the hold line before store_mission_timer_a, it doesn't fix them either .....
Does anyone know what I can do? I thought I could create a script (a copy of battle_tactic_init_aux) and call it from the mission in ti_before_mission_start, but I haven't tried it yet, I don't really know if it works.
 
Solution
Mine is a bit rustic, since the bots at first are static, without movement and without weapons in their hands. (I would have liked the bots to stay with their weapons in their hands, but I couldn't do it)
Well, basically, there are 3 triggers, the first and the second, it keeps the bots (attackers and defenders) without movements for 50 seconds, after that, the defenders defend their position and the attackers, they go on the attack. The third trigger, orders the defenders, after 88 seconds to attack (because if he ordered them to attack before, some bots fall into the sea, because the ship has not yet reached its fixed position).
The lines (set_show_messages, 0), and (set_show_messages, 1), go to the beginning and end of the first...
Mine is a bit rustic, since the bots at first are static, without movement and without weapons in their hands. (I would have liked the bots to stay with their weapons in their hands, but I couldn't do it)
Well, basically, there are 3 triggers, the first and the second, it keeps the bots (attackers and defenders) without movements for 50 seconds, after that, the defenders defend their position and the attackers, they go on the attack. The third trigger, orders the defenders, after 88 seconds to attack (because if he ordered them to attack before, some bots fall into the sea, because the ship has not yet reached its fixed position).
The lines (set_show_messages, 0), and (set_show_messages, 1), go to the beginning and end of the first trigger, which allows death notifications to appear after 50 seconds just when they start to move.
I put the triggers in the Ship_battle mission and they look like this:
Code:
############## orders defender #####################
      (0, 0, ti_once, [
        (set_show_messages, 0),
        (try_for_range, ":cur_group", 0, grc_everyone),
        (team_give_order, "$defender_team", ":cur_group", mordr_hold),
        (team_give_order, "$defender_team_2", ":cur_group", mordr_hold),
        (try_end),
        (store_mission_timer_a,":mission_time"),
        (ge,":mission_time",50),
        (try_for_range, ":cur_group", 0, grc_everyone),
        (team_give_order, "$defender_team", ":cur_group", mordr_stand_ground),
        (team_give_order, "$defender_team_2", ":cur_group", mordr_stand_ground),
        (try_end),
        (set_show_messages, 1),
        ], []),

(0, 0, ti_once, [
        (store_mission_timer_a,":mission_time"),
        (ge,":mission_time",88),
        (try_for_range, ":cur_group", 0, grc_everyone),
        (team_give_order, "$defender_team", ":cur_group", mordr_charge),
        (team_give_order, "$defender_team_2", ":cur_group", mordr_charge),
        (try_end),
        ], []),
       
############### orders attacker #################
      (0, 0, ti_once, [
        (try_for_range, ":cur_group", 0, grc_everyone),
        (team_give_order, "$attacker_team", ":cur_group", mordr_hold),
        (team_give_order, "$attacker_team_2", ":cur_group", mordr_hold),
        (try_end),
        (store_mission_timer_a,":mission_time"),
        (ge,":mission_time",50),
        (try_for_range, ":cur_group", 0, grc_everyone),
        (team_give_order, "$attacker_team", ":cur_group", mordr_charge),
        (team_give_order, "$attacker_team_2", ":cur_group", mordr_charge),
        (try_end),
        ], []),

image
https://www.mediafire.com/view/vx0tffpukv1q14p/20210812171232_1.jpg/file
 
Upvote 0
Solution
Back
Top Bottom