UE3 - UT3 JetPack Velocity problem

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

SuperiorChaos

New Member
Jan 4, 2011
4
0
0
Hello I've made simple jetpack pickup which thrusts the player into the air lets them fly around for 30 seconds when the fuel runs out and the player falls to the ground. The problem I'm having is that it doesn't always thrust you up the same height It appears to thrust you up the correct height if you walk into the pickup slowly but if you are moving quickly it won't send you very high at all.

Code:
class UTJetPack extends UTInventory
	placeable;
var SoundCue ActivateSound;

function GivenTo(Pawn NewOwner, optional bool bDoNotActivate)
{
	Super.GivenTo(NewOwner, bDoNotActivate);
	WorldInfo.Game.Broadcast(self,"Picked Up JetPack");
	SetTimer(30.0, false);
	PlaySound(SoundCue'A_Pickups.JetPack_Cue');
	NewOwner.Velocity += vect(0,0,1000);
	NewOwner.SetPhysics(PHYS_Flying);
	Spawn(class'UTJetPackEffect', Owner,, Owner.Location, Owner.Rotation);
}
function Timer()
{
	WorldInfo.Game.Broadcast(self,"JetPack Fuel Depleted");
    Owner.SetPhysics(PHYS_Falling);
	Destroy();
}

defaultproperties
{
	Begin Object Class=StaticMeshComponent Name=StaticMeshComponent1
		StaticMesh=StaticMesh'Pickups.JetPack'
		bOnlyOwnerSee=false
		CastShadow=true
		bForceDirectLightMap=true
		bCastDynamicShadow=false
		CollideActors=false
		BlockRigidBody=false
		Translation=(X=0.0,Y=0.0,Z=-20.0)
		Scale=0.2
	End Object
	DroppedPickupMesh=StaticMeshComponent1
	PickupFactoryMesh=StaticMeshComponent1

	MaxDesireability=1.00
	RespawnTime=30.0
	bReceiveOwnerEvents=true
	bDropOnDeath=true
	PickupSound=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_JumpBoots_PickupCue'
	ActivateSound=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_JumpBoots_JumpCue'
	bRenderOverlays=true
}
 

SuperiorChaos

New Member
Jan 4, 2011
4
0
0
I also have a jetpack sound that plays when the user picks up the jetpack until the fuel runs out however if the player is killed before the jetpack is depleted the sound continued to play. Is there anyway to make the sound stop if the jetpack is dropped before the timer runs out?