• Advertisement
Sign in to follow this  

Unreal Script Help

This topic is 4356 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
Sign in to follow this  

  • Advertisement