• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code [Help] Brute and Shiver in Versus

forrestmark9

Grizzled Veteran
Nov 29, 2011
1,110
42
I've been trying to get the Brute and Shiver to work in Marcos Versus mode but sadly I can't get them to work just how they should

The brute doesn't lower his block even though I specifically made it call the lower block function if it's up

The shivers teleport is messed up instead of teleporting to where I'm looking he teleports forward and from any distance

Here is there code:

Shiver:
Code:
function SetAttackAnim()
{
	if( ClientFire[0]==1 )
		SetAnimAction('Claw');
	else if( ClientFire[1]==1 && !bDecapitated && NextChargeTimer<Level.TimeSeconds && !IsInState('PlayerRunning') )
	{
		if( CanRun() )
			GoToState('PlayerRunning');
		if( NextChargeTimer<Level.TimeSeconds )
			return;
		else if( CanTeleport() )
			StartTeleport();	
		return;
	}
	else return;
	bShotAnim = true;
}
function FlashTeleport()
{
	if(PlayerController(Controller) == none)
		Super.FlashTeleport();
	else
		PlayerTeleport();
}
function PlayerTeleport()
{
	local Actor HitActor;
	local Vector HitNormal, HitLocation;

	HitActor = Trace(HitLocation, HitNormal, Location + float(10000) * vector(Rotation), Location, true);
	if(HitActor == none)
	{
		HitLocation = Location + float(10000) * vector(Rotation);
	}
	else
	{
		HitLocation = HitLocation + CollisionRadius * HitNormal;
	}
	
	SetLocation(HitLocation);
	PlaySound(Sound'WPC_Zeds2_A.WarpGroup', SLOT_Interact, 4.0);
	bFlashTeleporting = false;
	LastFlashTime = Level.TimeSeconds;
}

Brute:
Code:
function SetAttackAnim()
{
	if( ClientFire[0]==1 )
	{
		if( bServerBlock )
			SetAnimAction('AoeClaw');
		else
			SetAnimAction('BlockClaw');
	}
	else if( ClientFire[1]==1 && !bDecapitated && NextChargeTimer<Level.TimeSeconds && !IsInState('PlayerRunning') )
	{
		if( bServerBlock )
			ServerLowerBlock();
		else
			ServerRaiseBlock();
		return;
	}
	else return;
	bShotAnim = true;
}