Make tank shoot at inf with mg
Make tank shoot at inf with mg
.
Last edited by pointbreak on Sun Apr 20, 2025 10:58 am, edited 1 time in total.
- MustaphaTR
- Posts: 203
- Joined: Mon Aug 04, 2014 6:38 am
- Location: Kastamonu, Turkey
Re: Make tank shoot at inf with mg
Target vaildity is defined at the weapon itself, not on unit's Armament trait.
Re: Make tank shoot at inf with mg
.
Last edited by pointbreak on Sun Apr 20, 2025 10:58 am, edited 1 time in total.
Re: Make tank shoot at inf with mg
.
Last edited by pointbreak on Sun Apr 20, 2025 10:58 am, edited 1 time in total.
Re: Make tank shoot at inf with mg
.
Last edited by pointbreak on Sun Apr 20, 2025 10:58 am, edited 1 time in total.
Re: Make tank shoot at inf with mg
"Vehicles: vehicles.yaml" won't work, the game doesn't expect a "Vehicles" category. Try putting those changes in the "Rules" section,
i.e. "Rules: vehicles.yaml" (in case you haven't defined other rules yet).
i.e. "Rules: vehicles.yaml" (in case you haven't defined other rules yet).
Re: Make tank shoot at inf with mg
.
Last edited by pointbreak on Sun Apr 20, 2025 10:58 am, edited 1 time in total.
Re: Make tank shoot at inf with mg
Do you mind sharing your yaml here as well?pointbreak wrote: ↑Mon Jul 23, 2018 2:23 pmEDIT: Cannon only on structures and vehicles works, but at inf it still shoots with both. Hm. I'm using ValidTargets and InvalidTargets.. the latter doesn't seem to work?
Maybe those examples are helpful:
The 120mm cannons of mammoth tanks don't shoot infantry: https://github.com/OpenRA/OpenRA/blob/8 ... s.yaml#L72
The sniper can only shoot infantry (and the ground): https://github.com/OpenRA/OpenRA/blob/d ... er.yaml#L3
Re: Make tank shoot at inf with mg
.
Last edited by pointbreak on Sun Apr 20, 2025 10:58 am, edited 1 time in total.
Re: Make tank shoot at inf with mg
.
Last edited by pointbreak on Sun Apr 20, 2025 10:58 am, edited 1 time in total.
Re: Make tank shoot at inf with mg
.
Last edited by pointbreak on Sun Apr 20, 2025 10:57 am, edited 1 time in total.
- Graion Dilach
- Posts: 277
- Joined: Fri May 15, 2015 5:57 pm
Re: Make tank shoot at inf with mg
That yaml looks correct to me, so I'm not certain what goes wrong. IIRc we haven't shipped the OpenRA.Utility ra --resolved-rules/--resolved-weapons though in the last release (does worth a check though) which would help debugging here a lot. You coulda inherit the actual weapons anyway and just override InvalidTargets, allowing you to just go
Code: Select all
M1CarbineTANK:
Inherits: M1Carbine
InvalidTargets: Air, Vehicle, Structure