I've recently noticed the effect of the ReceiveAttackCommands flag under entity hardpoints (in the ebps files):
- Seting this flag to True for a particular hardpoint means that the gun will pick up the attack command. If the enemy is outside the arc of fire, the unit will rotate accordingly, first
- Setting this flag to False means that the weapon will ignore right-click commands. However, it will still acquire targets automatically within its arc of fire.
My question is:
- Is there a way to design a an ability that toggles the ReceiveAttackCommands flag for a particular hardpoint?
Now, let me motivate why I want this, with an example.
The reason I want to have an ability like this is to fix the Churchill Crocodile for a mod I am making. I want to allow the Crocodile cannon and the flamethrower to be controlled individually:
- You click the ability and right click on a tank; the cannon now aims at the tank
- You toggle the ability back and now you only control the flamethrower. You right click on an AT gun
- The end result is that the flamethrower is firing at the AT gun while the cannon is firing at the tank.
- (if possible, I would also like to have a 3rd toggle state that makes the user able to control both the cannon and the flamethrower at the same time)
So far, I have used a dummy weapon hack (like the OST half-track) for hardpoint1:
- While I am controlling the cannon, I set the hardpoint_01 to a dummy weapon with 360 cone of fire.
- While I am controlling the flamethrower, I set the dummy weapon to a 10-degree fire arc.
That way, attack-moving with the flamethrower means that the tank will continue to auto-rotate.
However, I have issues when it comes to ceding and gaining control of a gun (say the flamethrower). Since I can't find an action that lets me swap the ReceiveAttackCommands flag, I am using the following hack:
- I use 2 possible hardpoints for the flamethrower. One of them has the flag set to true, the other has the flag set to false
- Depending on the state of the toggle ability, one hardpoint has the flamethrower weapon, while the other gets a 360-dummy weapon.
However, this hack is problematic:
- The weapon does not retain its target when it "jumps" between hardpoints.
- An abusive user can completely skip the reload cycle by swapping their flamethrower weapons at the right moment. The counter-hack is to force a weapon reload every time the user swaps hardpoints. However, that will probably be annoying/unfair for the Crocodile user.
Is there a clean way to achieve this?
Question about weapon targeting
2 Aug 2016, 10:25 AM
#1

Posts: 2636 | Subs: 16
PAGES (1)

1 user is browsing this thread:
1 guest
Livestreams
![]() |
![]() |
![]() |
18 | ||
![]() |
![]() |
![]() |
12 | ||
![]() |
![]() |
![]() |
80 | ||
![]() |
![]() |
![]() |
46 | ||
![]() |
![]() |
![]() |
8 | ||
![]() |
![]() |
![]() |
8 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.46067.873+2
- 2.776130.857+1
- 3.397210.654+2
- 4.327117.736+4
- 5.12357.683+2
- 6.325146.690-1
- 7.856232.787+3
- 8.333131.718-1
- 9.735445.623+2
- 10.403296.577+4
Replay highlight
VS
-
cblanco ★
-
보드카 중대
-
VonManteuffel
-
Heartless Jäger

Einhoven Country

Honor it
15

Download
2527
Board Info
558 users are online:
558 guests
1 post in the last 24h
7 posts in the last week
23 posts in the last month
7 posts in the last week
23 posts in the last month
Registered members: 61054
Welcome our newest member, phimsexvnlove
Most online: 2195 users on 29 Sep 2025, 11:39 AM
Welcome our newest member, phimsexvnlove
Most online: 2195 users on 29 Sep 2025, 11:39 AM