UE3 - UDK Projectile impacting weapon

  • 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.

divak1219

New Member
Jan 21, 2012
1
0
0
Hey guys this is my first time posting here. I have created a weapon that will reflect off of any wall. The only problem I face now is that when I have the weapon hit a kactor the projectile won't move the kactor. What is going to be the best way of getting the weapon to move the kactor.

Below is the script for the weapon so far. I know its really simple, but I'm pretty new to scripting.

class UTProj_BarrelCannon extends UTProj_Rocket;

/**
*
*/

// Creating a Projectile that won't hurt the player
simulated function ProcessTouch(Actor Other, Vector HitLocation, Vector HitNormal)
{
if (Other != Instigator)
{
Other.TakeDamage(Damage,InstigatorController,HitLocation,MomentumTransfer * Normal(Velocity), MyDamageType,, self);
Shutdown();
}
}


// Making the Projectile bounce off of walls
simulated event HitWall(vector HitNormal, actor Wall, PrimitiveComponent WallComp)
{

Velocity = MirrorVectorByNormal (Velocity, HitNormal);
SetRotation(Rotator(Velocity));


}



// Setting the default properties of the Projectile
DefaultProperties
{

ProjFlightTemplate=ParticleSystem'KismetGame_Assets.Projectile.P_Spit_01'
ProjExplosionTemplate=ParticleSystem'KismetGame_Assets.Effects.P_BloodSplat_01'
ProjectileLightClass=class'UTGame.UTRocketLight'
ExplosionSound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_MetalLandCue'
Speed=650
MaxSpeed=2000
DrawScale=1.6
LifeSpan=10.0
MomentumTransfer=30



}