Page 1 of 1
Codebase question regarding force move
Posted: Mon Dec 05, 2022 11:31 pm
by LeonardMT
I dove into the codebase awhile back to try to implement
https://github.com/OpenRA/OpenRA/issues/19093 a feature that I desperately want but for the life of me I can't figure out how units know when they are being force moved.
Re: Codebase question regarding force move
Posted: Tue Dec 06, 2022 8:13 am
by Punsho
If you'd like to contribute to OpenRA you'll find
https://discord.openra.net/ to be the best place to communicate with the active devs
Re: Codebase question regarding force move
Posted: Tue Dec 06, 2022 9:20 am
by LeonardMT
I'm willing to be on irc but whenever I join no one seems to be there. I think I've somewhat figured it out with
Code: Select all
if (modifiers.HasModifier(TargetModifiers.ForceMove))
but learning about permanent injury I don't think it would be the best idea to add it to TakeCover.cs instead I think adding something like GrantConditionOnForceMove.
Code: Select all
^Soldier:
Inherits: ^Infantry
UpdatesPlayerStatistics:
MustBeDestroyed:
ProximityCaptor:
Types: Infantry
TakeCover:
RequiresCondition: !forcemoved
DamageModifiers:
Prone50Percent: 100
DamageTriggers: TriggerProne
Duration: 50
WithInfantryBody:
IdleSequences: idle1,idle2
StandSequences: stand,stand2
AttackFrontal:
FacingTolerance: 0
GrantConditionOnForceMove:
Condition: forcemoved