Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WithEmbeddedTurretSpriteBody: fetching the first Turreted: and ignores the rest #17373

MlemandPurrs opened this issue Nov 21, 2019 · 1 comment


Copy link

@MlemandPurrs MlemandPurrs commented Nov 21, 2019

I wanted to make it so that gun turret turns slower when low on power. As in the Traits code of WithEmbeddedTurretSpriteBody: is this comment 'Turret artwork is baked into the sprite, so only the first turret makes sense.', thought might workaround that by giving second Turreted: block also Turret: primary. That doesnt work since it cannot be pointed to use which turret. Its fetching the first Turreted and ignores the rest, even if i give the second Turreted block Turret: primary its ignored.

Cannot simply give multiple AttackTurreted: to one actor, even with RequiresCondition and PauseOnCondition setup such that ensures only one will be active at an time, for as then will get:
Exception of type System.InvalidOperationException: Actor gun has multiple traits of type OpenRA.Mods.Common.Traits.AttackBase.

		BuildPaletteOrder: 6
		Range: 3c0
		RequiresCondition: !disabled && !lowpower && !build-incomplete
		InitialFacing: 224
		RequiresCondition: !lowpower
		PauseOnCondition: lowpower
		Turret: primary
		TurnSpeed: 6
		InitialFacing: 224
		RequiresCondition: lowpower
		PauseOnCondition: !lowpower
		PauseOnCondition: disabled
		PauseOnCondition: disabled
		Condition: lowpower
		ValidPowerStates: Low, Critical

This comment has been minimized.

Copy link

@matjaeck matjaeck commented Nov 21, 2019

I wanted to make it so that gun turret turns slower when low on power.

People helped me to set up conditional turn speed for a map mod some time ago: (not updated since then).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.