Page 1 of 1
Engineer Husk Salvage
Posted: Sun Jan 15, 2017 2:42 am
Iâ€™ve been looking to test ways to add more functionality to the engineer and have recently been taking a stab at giving engineers the ability to salvage a husk for credits.
The optimal way, I believe, would be to use the Engiâ€™s ExternalCapture ability along with CashTrickler. However, because the mechanic uses Capture to restore husks, I canâ€™t find a way to implement the engi capture without resurrecting the destroyed vehicle.
Is there a way to either:
a) Use the Capture and ExternalCapture traits in a way they can work independently from each other or
b) A different method for restoring husks with mechanics other than capture?
Hereâ€™s what Iâ€™ve been rolling with so far:
Code: Select all
Type: building, ^Husk
Aesthetically there are a couple of minor issues. The CashTrickler wants to show ticks even when the value is set to 0. Iâ€™ve limited it to only tick once by making the interval absurdly long.
Also, I canâ€™t seem to get the ExternalCapturableBar to show.
Posted: Sun Jan 15, 2017 8:21 am
You can try https://github.com/OpenRA/OpenRA/wiki/T ... ateforcash
but that is not really what you want.
The existing traits aren't flexible enough for your idea. You need to touch the source code to get this to work.
Posted: Sun Jan 15, 2017 1:26 pm
Nah, it's completely possible to do this without engine changes - it's just a bit complex though.
Give Engineers a weapon which can target and destroy these husks only with a custom damagetype.
Add a SpawnActorOnDeath to all husks with an OwnerType of Killer using this engineer-weapon-only damagetype and set CashTrickler on these spawned actors to give the amount you want. You can use negative SelfHealing to kill these spawned actors afterwards.
If you want the Engineers being used only once for this, then the best option to give these spawned actors an AttackFrontal trait with FacingTolerance of 255 and a weapon which can only attack Engineers (Targetable is your friend) and set it up so that the husk will attack and kill the Engineer in retrospect (the other option of firing a GravityBomb along with the transformer will break SpawnActorOnDeath because the Engi will likely die before it could get the husk transformed)
EDIT: Meh. scrap AttackFrontal. An invisible turret is the way to go. Tesla Tank is IIRC set it up like that.
Posted: Sun Jan 15, 2017 1:49 pm
There is an AttackOmni tag for attacking anyway and it is what tesla tank uses.
Posted: Sun Jan 15, 2017 6:37 pm
You're wrong - it uses AttackTurreted with an invisible turret, see https://github.com/OpenRA/OpenRA/pull/9 ... f-44858120
why. You can check it in your yamls even.
Posted: Wed Jan 18, 2017 2:52 am
Frame took a crack at your weapon suggestion and came up with a working solution.
It looks a bit cumbersome but itâ€™ll let us playtest the husk salvage idea.