Mover's CrushWhenEncroach with bots solution

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

Mover's CrushWhenEncroach with bots solution

Post 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.
Attachments
EXP-MoverCrushBot.unr
(27.34 KiB) Downloaded 20 times
"Your stuff is known to be buggy and unfinished/not properly tested"
User avatar
papercoffee
Godlike
Posts: 10443
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Mover's CrushWhenEncroach with bots solution

Post by papercoffee »

DM-HealPod?
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Mover's CrushWhenEncroach with bots solution

Post by JackGriffin »

I think that one was a triggered zone.
So long, and thanks for all the fish
User avatar
PrinceOfFunky
Godlike
Posts: 1200
Joined: Mon Aug 31, 2015 10:31 pm

Re: Mover's CrushWhenEncroach with bots solution

Post 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.
"Your stuff is known to be buggy and unfinished/not properly tested"
Red_Fist
Godlike
Posts: 2163
Joined: Sun Oct 05, 2008 3:31 am

Re: Mover's CrushWhenEncroach with bots solution

Post by Red_Fist »

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: 1200
Joined: Mon Aug 31, 2015 10:31 pm

Re: Mover's CrushWhenEncroach with bots solution

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