Login

russian armor

Different ability outcomes based on range?

21 Oct 2016, 14:40 PM
#1
avatar of Mr.Smith

Posts: 2636 | Subs: 17

I want to design a deploy-flare ability for an infantry squad, with an ability maximum range of 40. I want the outcome of the ability to depend on the range between the infantry squad and the target:
- If the target is within distance 20, I want the squad to deploy a (fairly accurate) grenade toss
- If the target is between distance 20 and 40, I want the squad to use their flare gun, instead

My question for this is, how do you even design this choice?
- Is it possible to link together two requirement actions so that the 2nd executes only if the first one fails (apart from inverting the requirements of the first action)
- Is it even possible to introduce a range requirement, somehow?
21 Oct 2016, 14:47 PM
#2
avatar of Planet Smasher
Senior Modmaker Badge

Posts: 632 | Subs: 1

You could have the ability temporarily spawn an invisible entity at the targeted position. Then add two requirement actions with near_entity requirements: If the squad is within 20 units of the entity, use the smoke grenade throw. If the squad is not within 20 units of the entity, use the flare pistol. As the squad won't be moving and the target is a static position, it's fairly unlikely that both will execute!
21 Oct 2016, 15:12 PM
#3
avatar of Mr.Smith

Posts: 2636 | Subs: 17

You could have the ability temporarily spawn an invisible entity at the targeted position. Then add two requirement actions with near_entity requirements: If the squad is within 20 units of the entity, use the smoke grenade throw. If the squad is not within 20 units of the entity, use the flare pistol. As the squad won't be moving and the target is a static position, it's fairly unlikely that both will execute!


I hope so!

On a similar topic, I am trying to fix the initial rotation of the 2nd Brit howitzer (currently it's always facing the wrong end of the map).

I thought of a solution that works like this:
- Building_2 finishes constructing (the 2nd base building)
- Building_2 calls victor target on itself, forcing its own howitzer
- Unfortunately this also changes the vertical direction of the howitzer, forcing it to point towards the ground.

Is it possible to do something like this:
- Tell the howitzer to point not at the building itself, but to a distance of 200 from the building (same direction though). That way the howitzer would pick the right arc

Alternatively, even better, is the following even possible?
- Tell howitzer_1 to report where it is currently facing
- Use the reported location as the location that howitzer_2 to point to (again using victor target)

Thanks again. I am going to use your advice to implement the most British of Brit abilities ever conceived!
21 Oct 2016, 15:37 PM
#4
avatar of Planet Smasher
Senior Modmaker Badge

Posts: 632 | Subs: 1

I am going to use your advice to implement the most British of Brit abilities ever conceived!

WHAT HAVE I DONE?!

Why not just add a "set facing" ability that calls a victor target for the 25-pounders, forcing a barrage ability that doesn't do anything? It might be the simplest solution and can add a lot of value to the howitzers because barrages will come faster with some additional micro.
21 Oct 2016, 15:51 PM
#5
avatar of Mr.Smith

Posts: 2636 | Subs: 17


WHAT HAVE I DONE?!

Why not just add a "set facing" ability that calls a victor target for the 25-pounders, forcing a barrage ability that doesn't do anything? It might be the simplest solution and can add a lot of value to the howitzers because barrages will come faster with some additional micro.


I don't want to spoil too much about the QF25 barrage, yet (I will release the next QoL version sometime this weekend :megusta:)

However, from testing, I've seen that it's more important for the shells to land at almost precisely the same moment, rather than having the first shell be fired as fast as possible. (apart from also looking way cooler, the first option makes shells more difficult to dodge. (Especially if you mix the freshly-reworked airburst shells I made for my mod, too)

The only way to achieve the former is add a delay so that the howitzers have the time to align. However, if the first howitzer is facing the wrong way, it takes about 15 seconds to face the right direction.

Is it possible to increase the rotation rate for the howitzers somehow, or is that hardcoded somewhere in the animations? No matter how hard I tried to fix the value at tracking, speed didn't seem to matter at all.
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

416 users are online: 416 guests
8 posts in the last 24h
44 posts in the last week
149 posts in the last month
Registered members: 44931
Welcome our newest member, storususlc
Most online: 2043 users on 29 Oct 2023, 01:04 AM