Page 1 of 1
Mover's CrushWhenEncroach with bots solution
Posted: Wed Oct 10, 2018 3:28 am
by PrinceOfFunky
I know that bots cannot die crushed by movers since CrushWhenEncroach only triggers KilledBy() which is implemented only in PlayerPawn, but you can kill it with a SpecialEvent in KillInstigator state that can be triggered by mover bumps using the BumpEvent variable.
Re: Mover's CrushWhenEncroach with bots solution
Posted: Wed Oct 10, 2018 9:21 pm
by papercoffee
DM-HealPod?
Re: Mover's CrushWhenEncroach with bots solution
Posted: Wed Oct 10, 2018 11:03 pm
by JackGriffin
I think that one was a triggered zone.
Re: Mover's CrushWhenEncroach with bots solution
Posted: Thu Oct 11, 2018 12:37 am
by PrinceOfFunky
papercoffee wrote:DM-HealPod?
Oh damn you're right! Noob me
Fact is that
in this topic we talked about crushing bots not working cause the code in the Mover doesn't allow it, but now I see that in HealPod it works and it has the variable EncroachDamage set.
So it means that for this:
Barbie wrote:Found and fixed the issue in a way. In short: A Mover is calling a function that is only implemented for
PlayerPawn.
Long description: if a Mover touches an Actor, the engine calls Mover's function
EncroachingOn(actor Other). If Mover's EncroachType is set to
ME_CrushWhenEncroach, Other.KilledBy(Instigator) is called - that function is in fact defined in
Actor, but empty there. Only
PlayerPawn implements this function:
Code: Select all
function KilledBy(pawn EventInstigator) {
Health = 0;
Died( EventInstigator, 'Suicided', Location );
}
This also explains why a crushing Mover does not hurt Bots.
there is a workaround.
Re: Mover's CrushWhenEncroach with bots solution
Posted: Thu Oct 11, 2018 5:35 pm
by Red_Fist
Yes but, doesn't any mover give kill point if a trigger is used to move the mover ?
Re: Mover's CrushWhenEncroach with bots solution
Posted: Thu Oct 11, 2018 5:47 pm
by PrinceOfFunky
Red_Fist wrote:Yes but, doesn't any mover give kill point if a trigger is used to move the mover ?
It doesn't. I made a mover class which crushes any type of pawns, but since HealPod][ uses the standard mover class and it works the same way, at that point I believe what I did was useless lol.