Login

russian armor

How to modify an ability when near a building?

1 Sep 2016, 08:01 AM
#1
avatar of Mr.Smith

Posts: 2636 | Subs: 17

Suppose that I want to modify the following ability:
- Tommy AoE heal has, by default, a healing radius of 10
- I want to modify Tommy AoE heal so that the healing radius increases to 20 while the unit is within 15 units of a constructed forward assembly

I've tried the following two implementations, but both of them failed (due to bugs)

1. There is an option to make a requirement check for proximity to a particular entity (e.g., a forward assembly). However, when I tried it, the check seemed to completely ignore whether the assembly has been fully constructed or not

2. I tried giving forward assemblies an "AoE enable"-aura (sort of like the emplacement aura). The intention was that while the Tommy ability is active while the Tommy is within the aura of a forward assembly, the healing radius doubles.

However, I couldn't find any requirement check for "Unit is affected by aura"/etc.

3. I went for the aura approach again, but this time, I made the aura award an invisible, non-permanent slot item "healing-token-enabler". While Tommies were under possession of the token, the healing radius would increase.

This seemed to work alright for a while, but after some testing, I noticed that it was possible to abuse a bug and make the Tommies retain that item permanently. (vet-gate style: reinforce the squad while they have the item, and kill the original members of the squad when it walked into the aura).

Is there any solution to this? Thx!
8 Sep 2016, 08:57 AM
#2
avatar of Planet Smasher
Senior Modmaker Badge

Posts: 632 | Subs: 1

1. There is an option to make a requirement check for proximity to a particular entity (e.g., a forward assembly). However, when I tried it, the check seemed to completely ignore whether the assembly has been fully constructed or not


This is the way to go. If you add a required_constructionstate to the near_entity_requirement, it should work as intended!
8 Sep 2016, 18:03 PM
#3
avatar of Mr.Smith

Posts: 2636 | Subs: 17

Just in case somebody wants to try something similar, I found two ways to get around the problem.

1. Slot item approach:
- Make the token slot-item non-permanent
- Make sure that the aura "affects squads" flag is set to True

(I had the "affects squads" set to False, which meant that the non-permanent slot item was not getting deleted from the new entities).

2. (related) upgrade approach, in case you want abilities affecting other abilities
- Say you want ability B to alter its behaviour while ability A (toggle or modal) is active
- Create a token upgrade which does nothing (or copy aef medic_auto_heal_refresh)
- Put an add-upgrade (token) on self-start actions of ability A
- Put a remove-upgrade (token) on self-end actions of ability A
- Add a requirement action for the token on ability B
- This won't work for auras (since upgrades are permanent, unless explicitly removed)
1 user is browsing this thread: 1 guest

Livestreams

unknown 51
United States 31
United States 24
unknown 8

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

850 users are online: 850 guests
0 post in the last 24h
7 posts in the last week
34 posts in the last month
Registered members: 49122
Welcome our newest member, Harda621
Most online: 2043 users on 29 Oct 2023, 01:04 AM