Mover's CrushWhenEncroach with bots solution

Tutorials and discussions about Mapping - Introduce your own ones!

Mover's CrushWhenEncroach with bots solution

Postby 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.
Attachments
EXP-MoverCrushBot.unr
(27.34 KiB) Downloaded 1 time
Image
User avatar
PrinceOfFunky
Inhuman
 
Posts: 923
Joined: Mon Aug 31, 2015 10:31 pm

Re: Mover's CrushWhenEncroach with bots solution

Postby papercoffee » Wed Oct 10, 2018 9:21 pm

DM-HealPod?
User avatar
papercoffee
Site Staff
 
Posts: 8750
Joined: Wed Jul 15, 2009 11:36 am
Location: Cologne, the city with the big cathedral.
Personal rank: coffee addicted !!!

Re: Mover's CrushWhenEncroach with bots solution

Postby JackGriffin » Wed Oct 10, 2018 11:03 pm

I think that one was a triggered zone.
User avatar
JackGriffin
Godlike
 
Posts: 3446
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Hack coder

Re: Mover's CrushWhenEncroach with bots solution

Postby 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.
Image
User avatar
PrinceOfFunky
Inhuman
 
Posts: 923
Joined: Mon Aug 31, 2015 10:31 pm

Re: Mover's CrushWhenEncroach with bots solution

Postby 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
Red_Fist
Godlike
 
Posts: 1350
Joined: Sun Oct 05, 2008 3:31 am

Re: Mover's CrushWhenEncroach with bots solution

Postby 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.
Image
User avatar
PrinceOfFunky
Inhuman
 
Posts: 923
Joined: Mon Aug 31, 2015 10:31 pm


Return to Mapping

Who is online

Users browsing this forum: Google [Bot] and 3 guests