Page 1 of 1
Make tank shoot at inf with mg
Posted: Mon Jul 23, 2018 10:57 am
by pointbreak
.
Re: Make tank shoot at inf with mg
Posted: Mon Jul 23, 2018 11:42 am
by MustaphaTR
Target vaildity is defined at the weapon itself, not on unit's Armament trait.
Re: Make tank shoot at inf with mg
Posted: Mon Jul 23, 2018 11:51 am
by pointbreak
.
Re: Make tank shoot at inf with mg
Posted: Mon Jul 23, 2018 12:21 pm
by pointbreak
.
Re: Make tank shoot at inf with mg
Posted: Mon Jul 23, 2018 1:44 pm
by pointbreak
.
Re: Make tank shoot at inf with mg
Posted: Mon Jul 23, 2018 1:48 pm
by abcdefg30
"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).
Re: Make tank shoot at inf with mg
Posted: Mon Jul 23, 2018 2:23 pm
by pointbreak
.
Re: Make tank shoot at inf with mg
Posted: Mon Jul 23, 2018 4:38 pm
by abcdefg30
pointbreak wrote: ↑Mon Jul 23, 2018 2:23 pm
EDIT: 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?
Do you mind sharing your yaml here as well?
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
Posted: Mon Jul 23, 2018 9:46 pm
by pointbreak
.
Re: Make tank shoot at inf with mg
Posted: Tue Jul 24, 2018 8:58 am
by pointbreak
.
Re: Make tank shoot at inf with mg
Posted: Tue Jul 24, 2018 11:15 am
by pointbreak
.
Re: Make tank shoot at inf with mg
Posted: Tue Jul 24, 2018 2:15 pm
by Graion Dilach
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