Sign in to follow this  
isiahil

Unreal Script Help

Recommended Posts

isiahil    100
I have made the concussionRifle in the beginners turorials. I want to add functionality to drop the gun whn you press the alt fire button. I have found a function: simulated function DetachFromPawn(Pawn P) \\Detaches the weapon from the pawn. That gets the weapon away from the pawn(which i am assuming is the player) Where would I put this code to have it executed? Could someone post an example if they have one? and what parameter would I pass to the function for pawn? The code for the files are as follows: ConcussionRifle.uc //ConcussionRifle //This is your inventory class class ConcussionRifle extends ShockRifle; defaultproperties { ItemName="Concussion Rifle" FireModeClass(0)=ConcussionRifleFire PickupClass=class'ConcussionRiflePickup' DefaultPriority=15 Priority=15 bCanThrow=true DrawScale=400.0 } =========================== ConcussionRifleFire.uc //ConcussionRifleFire //When it is fired class ConcussionRifleFire extends ShockBeamFire; defaultproperties { Momentum=+1000000.0 DamageMin=3 DamageMax=3 } ===================== ConcussionRiflePickUp.uc //ConcussionRiflePickUp //This is what is laying on the ground class ConcussionRiflePickup extends ShockRiflePickup; defaultproperties { InventoryType=class'ConcussionRifle' PickupMessage="You got the concusiion Rifle." }

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this