How to fix Tank Trap Repair Animation
Posts: 42
Any chance I could get a clue, hint, or straight-up answer?
I see in the various repair abilities that there are requirement_action(s), that there are heal_action(s) with target_info(s), and I see the state_machine_name being set to either blowtorch_state or build_shovel_sandbag_state but for some reason I just can't seem to figure out the logic and don't really know why or how either of those states is actually chosen.
Thanks in advance,
Pops.
Posts: 756 | Subs: 8
Posts: 42
Here's where I am mentally, maybe you can knock me loose. In delayed_actions they list list all the unit_types that you could want to repair under heal_action. Then later, still under delayed_actions, they have another requirement_action where they set the state_machine_name to blowtorch_state, do_action_state_name set to active, with a follow-on requirement_table that has unit_type set to building. aef_tank_trap_mp has 3 unit types, one of them being building. Why then doesn't the animation use blowtorch when repairing an aef_tank_trap_mp instead of the sandbag animation?
Posts: 756 | Subs: 8
Posts: 42
Posts: 756 | Subs: 8
requirement_action #1: cannot be injured
- requirement_action #2: cannot be moving
-- (delayed) requirement_action #3: cannot be moving
-- (delayed) requirement_action #4: target cannot be building (means it will only set blowtorch on when target is anything other than a building)
-- (delayed) requirement_action #5: target must be building and cannot be vehicle_building (means it will only set sandbags on when target is a building and not a vehicle_building)
-- (delayed) requirement_action #6: target must be both a building and a vehicle_building (means it will only set blowtorch on when target is both a building and a vehicle_building)
You would probably have to add the unit_type tank_traps in there for specificity. The thing about requirements is that they are very specific. As you can see in the logic above, the blowtorch only fires if the target is NOT a building OR is a building AND vehicle_building. There are no in-betweens, which is why it does not fire if the target is a building AND tank_traps. The logic would have to be OR, so maybe NOT a building OR a building AND tank_traps.
Something like this:
required_any_in_list (OR)
- required_not (NOT)
-- required_unit_type: building
- required_all_in_list (AND)
-- required_unit_type: building
-- required_unit_type: tank_traps
in the first blowtorch requirement, which reads as target is NOT a building OR (is both a building AND tank_traps)
or:
required_all_in_list (AND)
- required_unit_type: building
- required_any_in_list (OR)
-- required_unit_type: vehicle_building
-- required_unit_type: tank_traps
in the second blowtorch requirement, which reads as target is a building AND (either a vehicle_building OR tank_traps).
Posts: 42
Posts: 42
Posts: 42
For my testing I have been using Island Fortress and I use world builder to plant units, words, words, words... There is a "bridge_25_01" on this map, several actually. In their unit_type_list they have "demolishable_bridge" and "building" selected. When they are demolished the Rear Echelon troops repair them with a torch, not sandbags. Given that they use the ability we are discussing above, why are they using a torch? What am I missing?
Posts: 42
Posts: 756 | Subs: 8
Posts: 42
Posts: 42
Posts: 756 | Subs: 8
target_special_validation is what can actually be targeted by the ability.
You'll need both.
Honestly, the logic already should work for tank traps, without modification, since they are buildings. I would try simply adding tank_traps to the target_special_validation, just before the has_all_in_list.
Posts: 42
Posts: 756 | Subs: 8
Posts: 42
Posts: 756 | Subs: 8
Posts: 42
Posts: 42
Livestreams
22 | |||||
897 | |||||
2 | |||||
1 | |||||
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.831222.789+37
- 2.34957.860+14
- 3.1109614.644+10
- 4.608220.734+2
- 5.276108.719+27
- 6.305114.728+1
- 7.916405.693-2
- 8.722440.621+4
- 9.261137.656+2
- 10.1041674.607-2
Replay highlight
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Board Info
8 posts in the last week
34 posts in the last month
Welcome our newest member, Dedek545
Most online: 2043 users on 29 Oct 2023, 01:04 AM