Mover's CrushWhenEncroach with bots solution

Tutorials and discussions about Mapping - Introduce your own ones!
User avatar
PrinceOfFunky
Godlike
Posts: 1155
Joined: Mon Aug 31, 2015 10:31 pm

Mover's CrushWhenEncroach with bots solution

Post by PrinceOfFunky » Wed Oct 10, 2018 3:28 am

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.
You do not have the required permissions to view the files attached to this post.
"Your stuff is known to be buggy and unfinished/not properly tested"

User avatar
papercoffee
Godlike
Posts: 9772
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.

Re: Mover's CrushWhenEncroach with bots solution

Post by papercoffee » Wed Oct 10, 2018 9:21 pm

DM-HealPod?

JackGriffin
Godlike
Posts: 3766
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Mover's CrushWhenEncroach with bots solution

Post by JackGriffin » Wed Oct 10, 2018 11:03 pm

I think that one was a triggered zone.
So long, and thanks for all the fish

User avatar
PrinceOfFunky
Godlike
Posts: 1155
Joined: Mon Aug 31, 2015 10:31 pm

Re: Mover's CrushWhenEncroach with bots solution

Post by PrinceOfFunky » Thu Oct 11, 2018 12:37 am

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.
"Your stuff is known to be buggy and unfinished/not properly tested"

Red_Fist
Godlike
Posts: 1849
Joined: Sun Oct 05, 2008 3:31 am

Re: Mover's CrushWhenEncroach with bots solution

Post by Red_Fist » Thu Oct 11, 2018 5:35 pm

Yes but, doesn't any mover give kill point if a trigger is used to move the mover ?
Binary Space Partitioning

User avatar
PrinceOfFunky
Godlike
Posts: 1155
Joined: Mon Aug 31, 2015 10:31 pm

Re: Mover's CrushWhenEncroach with bots solution

Post by PrinceOfFunky » Thu Oct 11, 2018 5:47 pm

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.
"Your stuff is known to be buggy and unfinished/not properly tested"