| Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
| previous class next class | frames no frames | |||||
Base Weapon implementation. Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
Core.Object
|
+-- Engine.Actor
|
+-- Engine.Inventory
|
+-- Engine.Weapon
GameWeapon
| Constants Summary |
|---|
| Variables Summary | |
|---|---|
| float | AIRating |
| bool | bCanThrow |
| bool | bInstantHit |
| bool | bMeleeWeapon |
| bool | bWeaponPutDown |
| float | CachedMaxRange |
| byte | CurrentFireMode |
| Array<Name> | FiringStatesArray |
| Array<class<DamageType>> | InstantHitDamageTypes |
| float | Priority |
| array<byte> | ShouldFireOnRelease |
| Array<EWeaponFireType> | WeaponFireTypes |
| Array<class<Projectile>> | WeaponProjectiles |
| Weapon | |
| float | DefaultAnimSpeed |
| float | EquipTime |
| Array<float> | FireInterval |
| vector | FireOffset |
| Array<float> | InstantHitDamage |
| Array<float> | InstantHitMomentum |
| MeshComponent | Mesh |
| float | PutDownTime |
| Array<float> | Spread |
| float | WeaponRange |
| Enumerations Summary | ||
|---|---|---|
| EWeaponFireType EWFT_InstantHit, EWFT_Projectile, EWFT_Custom, EWFT_None | ||
| Inherited Enumerations from Engine.Actor |
|---|
| ECollisionType, EDoubleClickDir, EMoveDir, ENetRole, EPhysics, ETravelType |
| Structures Summary |
|---|
| Inherited Structures from Engine.Actor |
|---|
| AnimSlotDesc, AnimSlotInfo, AsyncLineCheckResult, CollisionImpactData, ImpactInfo, NavReference, ReplicatedHitImpulse, RigidBodyContactInfo, RigidBodyState, TimerData, TraceHitInfo |
| Functions Summary | ||
|---|---|---|
![]() | Activate ())) | |
![]() | Activate ())) Active | |
![]() | Activate ())) WeaponEquipping | |
![]() | int | AddAmmo (int Amount) |
![]() | rotator | AddSpread (rotator BaseAim)) |
![]() | float | AdjustFOVAngle (float FOVAngle)) |
![]() | AttachWeaponTo (SkeletalMeshComponent MeshCpnt, optional Name SocketName) | |
![]() | BeginFire (Byte FireModeNum)) | |
![]() | BeginFire (byte FireModeNum)) Active | |
![]() | BeginState (Name PreviousStateName)) Active | |
![]() | BeginState (Name PreviousStateName )) Inactive | |
![]() | BeginState (Name PreviousStateName)) PendingClientWeaponSet | |
![]() | BeginState (Name PreviousStateName)) WeaponEquipping | |
![]() | BeginState (Name PreviousStateName )) WeaponFiring | |
![]() | BeginState (Name PreviousStateName)) WeaponPuttingDown | |
![]() | ImpactInfo | CalcWeaponFire (vector StartTrace, vector EndTrace, optional out array<ImpactInfo> ImpactList)) |
![]() | bool | CanAttack (Actor Other)) |
![]() | bool | CanThrow ())) |
![]() | ClearFlashCount ())) | |
![]() | ClearFlashLocation ())) | |
![]() | ClearPendingFire (int FireMode)) | |
![]() | ClientWeaponSet (bool bOptionalSet)) | |
![]() | ClientWeaponThrown ())) | |
![]() | ConsumeAmmo (byte FireModeNum) | |
![]() | CustomFire () | |
![]() | DemoBeginFire (byte FireModeNum)) | |
![]() | DemoEndFire (byte FireModeNum)) | |
![]() | bool | DenyClientWeaponSet ())) |
![]() | bool | DenyPickupQuery (class<Inventory> ItemClass, Actor Pickup)) |
![]() | Destroyed ())) | |
![]() | DetachWeapon () | |
![]() | DisplayDebug (HUD HUD, out float out_YL, out float out_YPos)) | |
![]() | bool | DoOverrideNextWeapon ())) |
![]() | bool | DoOverridePrevWeapon ())) |
![]() | DropFrom (vector StartLocation, vector StartVelocity)) | |
![]() | DumpWeaponDebugToLog ())) | |
![]() | EndFire (byte FireModeNum)) | |
![]() | EndState (Name NextStateName)) PendingClientWeaponSet | |
![]() | EndState (Name NextStateName)) WeaponEquipping | |
![]() | EndState (Name NextStateName )) WeaponFiring | |
![]() | EndState (Name NextStateName)) WeaponPuttingDown | |
![]() | FireAmmunition ())) | |
![]() | FireModeUpdated (byte FiringMode, bool bViaReplication) | |
![]() | bool | FireOnRelease ())) |
![]() | bool | FocusOnLeader (bool bLeaderFiring)) |
![]() | ForceEndFire ())) | |
![]() | Rotator | GetAdjustedAim (vector StartFireLoc )) |
![]() | float | GetAIRating ())) |
![]() | float | GetDamageRadius ())) |
![]() | float | GetFireInterval (byte FireModeNum )) |
![]() | Vector | GetMuzzleLoc ())) |
![]() | vector | GetPhysicalFireStartLoc (optional vector AimDir)) |
![]() | class<Projectile> | GetProjectileClass ())) |
![]() | Actor | GetTraceOwner ())) |
![]() | float | GetTraceRange ())) |
![]() | GetViewAxes (out vector XAxis, out vector YAxis, out vector ZAxis )) | |
![]() | AnimNodeSequence | GetWeaponAnimNodeSeq ())) |
![]() | GetWeaponDebug (out Array | |
![]() | float | GetWeaponRating ())) |
![]() | GivenTo (Pawn ThisPawn, optional bool bDoNotActivate)) | |
![]() | bool | HasAmmo (byte FireModeNum, optional int Amount )) |
![]() | bool | HasAnyAmmo ())) |
![]() | HolderDied ())) | |
![]() | IncrementFlashCount ())) | |
![]() | InstantFire ())) | |
![]() | bool | IsActiveWeapon ())) |
![]() | bool | IsFiring ())) |
![]() | bool | IsFiring ())) WeaponFiring |
![]() | ItemRemovedFromInvManager ())) | |
![]() | float | MaxRange ())) |
![]() | bool | PassThroughDamage (Actor HitActor)) |
![]() | bool | PendingFire (int FireMode)) |
![]() | PendingWeaponSetTimer ())) PendingClientWeaponSet | |
![]() | PlayFireEffects (byte FireModeNum, optional vector HitLocation) | |
![]() | PlayFiringSound () | |
![]() | PlayWeaponAnimation (Name Sequence, float fDesiredDuration, optional bool bLoop, optional SkeletalMeshComponent SkelMesh)) | |
![]() | ProcessInstantHit (byte FiringMode, ImpactInfo Impact )) | |
![]() | Projectile | ProjectileFire ())) |
![]() | PutDownWeapon ())) | |
![]() | float | RangedAttackTime ())) |
![]() | bool | ReadyToFire (bool bFinished)) Active |
![]() | bool | RecommendLongRangedAttack ())) |
![]() | bool | RecommendRangedAttack ())) |
![]() | RefireCheckTimer () | |
![]() | RefireCheckTimer ())) WeaponFiring | |
![]() | float | RelativeStrengthVersus (Pawn P, float Dist)) |
![]() | SendToFiringState (byte FireModeNum)) | |
![]() | ServerStartFire (byte FireModeNum)) | |
![]() | ServerStartFire (byte FireModeNum )) Inactive | |
![]() | ServerStopFire (byte FireModeNum)) | |
![]() | ServerStopFire (byte FireModeNum )) Inactive | |
![]() | SetCurrentFireMode (byte FiringModeNum)) | |
![]() | SetFlashLocation (vector HitLocation )) | |
![]() | SetPendingFire (int FireMode)) | |
![]() | bool | ShouldRefire ())) |
![]() | StartFire (byte FireModeNum)) | |
![]() | StartFire (byte FireModeNum) Inactive | |
![]() | bool | StillFiring (byte FireMode)) |
![]() | StopFire (byte FireModeNum)) | |
![]() | StopFireEffects (byte FireModeNum) | |
![]() | StopWeaponAnimation ())) | |
![]() | float | SuggestAttackStyle ())) |
![]() | float | SuggestDefenseStyle ())) |
![]() | TimeWeaponEquipping ())) | |
![]() | TimeWeaponFiring (byte FireModeNum )) | |
![]() | TimeWeaponPutDown ())) | |
![]() | bool | TryPutDown ())) |
![]() | bool | TryPutDown ())) Active |
![]() | bool | TryPutDown ())) Inactive |
![]() | bool | TryPutDown ())) WeaponPuttingDown |
![]() | WeaponCalcCamera (float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot) | |
![]() | WeaponEmpty () | |
![]() | WeaponEquipped ())) WeaponEquipping | |
![]() | WeaponIsDown ())) WeaponPuttingDown | |
![]() | WeaponLog (coerce String Msg, coerce String FuncStr )) | |
![]() | WeaponPlaySound (SoundCue Sound, optional float NoiseLoudness )) | |
| Inherited Functions from Engine.Inventory |
|---|
| ActiveRenderOverlays, AnnouncePickup, BotDesireability, ClientGivenTo, DenyPickupQuery, Destroyed, DetourWeight, DropFrom, GetHumanReadableName, GetLocalString, GivenTo, GiveTo, ItemRemovedFromInvManager, OwnerEvent, RenderOverlays |
| States Summary |
|---|
| Active Source code |
|---|
simulated state Active /********************************************************************************************* * State Active * A Weapon this is being held by a pawn should be in the active state. In this state, * a weapon should loop any number of idle animations, as well as check the PendingFire flags * to see if a shot has been fired. *********************************************************************************************/ |
| Activate, BeginFire, BeginState, ReadyToFire, TryPutDown |
| Inactive Source code |
|---|
auto state Inactive /********************************************************************************************* * State Inactive * Default state for a weapon. It is not active, cannot fire and resides in player inventory. *********************************************************************************************/ |
| BeginState, ServerStartFire, ServerStopFire, StartFire, TryPutDown |
| PendingClientWeaponSet Source code |
|---|
state PendingClientWeaponSet /********************************************************************************************* * State PendingClientWeaponSet * A weapon sets in this state on a remote client while it awaits full replication of all * properties. *********************************************************************************************/ |
| BeginState, EndState, PendingWeaponSetTimer |
| WeaponEquipping Source code |
|---|
simulated state WeaponEquipping /** * State WeaponEquipping * The Weapon is in this state while transitioning from Inactive to Active state. * Typically, the weapon will remain in this state while its selection animation is being played. * While in this state, the weapon cannot be fired. */ |
| Activate, BeginState, EndState, WeaponEquipped |
| WeaponFiring Source code |
|---|
simulated state WeaponFiring /********************************************************************************************* * state WeaponFiring * This is the default Firing State. It's performed on both the client and the server. *********************************************************************************************/ |
| BeginState, EndState, IsFiring, RefireCheckTimer |
| WeaponPuttingDown Source code |
|---|
simulated state WeaponPuttingDown /** * State WeaponPuttingDown * Putting down weapon in favor of a new one. * Weapon is transitioning to the Inactive state. */ |
| BeginState, EndState, TryPutDown, WeaponIsDown |
| Variables Detail |
|---|
Can player toss his weapon out? Typically false for default inventory.
Set to put weapon down at the end of a state. Typically used to change weapons on state changes (weapon up, stopped firing...)
Cache MaxRange of weapon
Current FireMode
Array of firing states defining available firemodes
DamageTypes for Instant Hit Weapons
Configurable weapon priority. Ties (mod weapons) are broken by GroupWeight
AI Hints
Defines the type of fire (see Enum above) for each mode
The Class of Projectile to spawn
When no duration is specified, speed to play anims.
How long does it take to Equip this weapon
Holds the amount of time a single shot takes
Holds an offest for spawning protectile effects.
How much damage does a given instanthit shot do
momentum transfer scaling for instant hit damage
Weapon Mesh
How long does it take to put this weapon down
How much of a spread between shots
Range of Weapon, used for Traces (InstantFire, ProjectileFire, AdjustAim...)
| Enumerations Detail |
|---|
This enum defines the firing type for the weapon. EWFT_InstantHit - The weapon traces a shot to determine a hit and immediately causes an effect EWFT_Projectile - The weapon spawns a new projectile pointed at the crosshair EWFT_Custom - Requires a custom fire sequence
| Functions Detail |
|---|
Activate Source codeAll inventory use the Activate() function when an item is selected for use. For weapons, this function starts the Equipping process. If the weapon is the inactive state, it will go to the 'WeaponEquipping' followed by 'Active' state, and ready to be fired.
Activate Active Source codeActivate() ignored since already active
Activate WeaponEquipping Source codeActivate() ignored since already becoming active
AddAmmo Source codeAdd ammo to weapon
@param Amount to add.
@return Amount actually added. (In case magazine is already full and some ammo is left Subclass me to define ammo addition rules.
AddSpread Source codeAdds any fire spread offset to the passed in rotator
@param Aim the base aim direction
@return the adjusted aim direction
AdjustFOVAngle Source codeThis function can be used by a weapon to override a playercontroller's FOVAngle. It should be overriden in a subclass.
AttachWeaponTo Source codeAttachWeaponTo is called when it's time to attach the weapon's mesh to a location. it should be subclassed.
BeginFire Source codeBeginFire is the point at which the server and client sync up their code path. It's job is to set the weapon in to the firing state. Network: LocalPlayer and Server
BeginFire Active Source codeOverride BeginFire so that it will enter the firing state right away.
BeginState Active Source codeInitialize the weapon as being active and ready to go.
BeginState Inactive Source codeClear out the PendingFires
BeginState PendingClientWeaponSet Source codeEvent called when weapon enters this state
BeginState WeaponEquipping Source code
BeginState WeaponFiring Source code
BeginState WeaponPuttingDown Source codeTime the process and clear the Firing flags
CalcWeaponFire Source codeCalcWeaponFire: Simulate an instant hit shot. This doesn't deal any damage nor trigger any effect. It just simulates a shot and returns the hit information, to be post-processed later. ImpactList returns a list of ImpactInfo containing all listed impacts during the simulation. CalcWeaponFire however returns one impact (return variable) being the first geometry impact straight, with no direction change. If you were to do refraction, reflection, bullet penetration or something like that, this would return exactly when the crosshair sees: The first 'real geometry' impact, skipping invisible triggers and volumes.
@param StartTrace world location to start trace from
@param EndTrace world location to end trace at
@output ImpactList list of all impacts that occured during simulation
@return first 'real geometry' impact that occured.
@note if an impact didn't occur, and impact is still returned, with its HitLocation being the EndTrace value.
CanAttack Source code
CanThrow Source codeReturns true if this item can be thrown out.
ClearFlashCount Source codeClear flashCount variable on Pawn. and call WeaponStoppedFiring event. Call this on the server and local player. Network: Server or Local Player
ClearFlashLocation Source codeReset flash location variable. and call stop firing. Network: Server only
ClearPendingFire Source code
ClientWeaponSet Source codeis called by the server to tell the client about potential weapon changes after the player runs over a weapon (the client decides whether to actually switch weapons or not. Network: LocalPlayer
@param bOptionalSet. Set to true if the switch is optional. (simple weapon pickup and weight against current weapon).
ClientWeaponThrown Source codeThis function is called when the client needs to discard the weapon
ConsumeAmmo Source codeConsumes ammunition when firing a shot. Subclass me to define weapon ammunition consumption.
CustomFire Source codeIf the weapon isn't an instant hit, or a simple projectile, it should use the tyoe EWFT_Custom. In those cases this function will be called. It should be subclassed by the custom weapon.
DemoBeginFire Source codePasses on BeginFire calls to demos
DemoEndFire Source codePasses on EndFire calls to demos
DenyClientWeaponSet Source codeReturns true if this weapon wants to deny a ClientWeaponSwitch call
DenyPickupQuery Source codeWhen you pickup an weapon, the inventory system has a chance to restrict the pickup.
Destroyed Source codeEvent called when weapon actor is destroyed
DetachWeapon Source codeDetach weapon components from instigator. Perform any clean up. Should be subclassed.
DisplayDebug Source codelist important Weapon variables on canvas. HUD will call DisplayDebug() on the current ViewTarget when the ShowDebug exec is used
@param HUD - HUD with canvas to draw on
@input out_YL - Height of the current font
@input out_YPos - Y position on Canvas. out_YPos += out_YL, gives position to draw text for next debug line.
DoOverrideNextWeapon Source codehook to override Next weapon call. For example the physics gun uses it to have mouse wheel change the distance of the held object. Warning: only use in firing state, otherwise it breaks weapon switching
DoOverridePrevWeapon Source codehook to override Previous weapon call.
DropFrom Source codeDrop this weapon out in to the world
@param StartLocation - The World Location to drop this item from
@param StartVelocity - The initial velocity for the item when dropped
DumpWeaponDebugToLog Source codeDump debug information for this weapon to log file.
EndFire Source codeLike BeginFire, this function puts a client and the server in sync and shuts down the firing sequence on both. Network: LocalPlayer and Server
EndState PendingClientWeaponSet Source codeEvent called when weapon leaves this state
EndState WeaponEquipping Source code
EndState WeaponFiring Source code
EndState WeaponPuttingDown Source code
FireAmmunition Source codeFireAmmunition: Perform all logic associated with firing a shot - Fires ammunition (instant hit or spawn projectile) - Consumes ammunition - Plays any associated effects (fire sound and whatnot) Network: LocalPlayer and Server
FireModeUpdated Source codeEvent called when Pawn.FiringMode has been changed. bViaReplication indicates if this was the result of a replication call.
FireOnRelease Source code
FocusOnLeader Source code
ForceEndFire Source codeClear all pending fires. This is non replicated flag.
GetAdjustedAim Source codeGetAdjustedAim begins a chain of function class that allows the weapon, the pawn and the controller to make on the fly adjustments to where this weapon is pointing.
GetAIRating Source codeAI interface
GetDamageRadius Source codeReturns the DamageRadius of projectiles being shot
GetFireInterval Source codeReturns interval in seconds between each shot, for the firing state of FireModeNum firing mode.
@param FireModeNum fire mode
@return Period in seconds of firing mode
GetMuzzleLoc Source codeThis function returns the world location for spawning the visual effects
GetPhysicalFireStartLoc Source codeThis function returns the world location for spawning the projectile, pulled in to the Pawn's collision along the AimDir direction.
GetProjectileClass Source codeReturns the type of projectile to spawn. We use a function so subclasses can override it if needed (case in point, homing rockets).
GetTraceOwner Source code
@return the actor that 'owns' this weapon's traces (i.e. can't be hit by them)
GetTraceRange Source codeRange of weapon Used for Traces (CalcWeaponFire, InstantFire, ProjectileFire, AdjustAim...) State scoped accessor function. Override in proper state
@return range of weapon, to be used mainly for traces.
GetViewAxes Source codeReturns the base view aim of the weapon owner
GetWeaponAnimNodeSeq Source codeReturns the AnimNodeSequence the weapon is using to play animations.
GetWeaponDebug Source codeRetrieves important weapon debug information as an array of strings. That can then be dumped or displayed on HUD.
GetWeaponRating Source codeReturns a weight reflecting the desire to use the given weapon, used for AI and player best weapon selection.
@return weapon rating (range -1.f to 1.f)
GivenTo Source codeThis Weapon has just been given to this Pawn
@param thisPawn new weapon owner
HasAmmo Source codeThis function checks to see if the weapon has any ammo available for a given fire mode.
@param FireModeNum - The Fire Mode to Test For
@param Amount - [Optional] Check to see if this amount is available.
@return true if ammo is available for Firemode FireModeNum.
HasAnyAmmo Source codereturns true if this weapon has any ammo left, regardless of the actual firing mode.
HolderDied Source codePawn holding this weapon as active weapon just died.
IncrementFlashCount Source codeIncrement Pawn's FlashCount variable. This is used to play weapon fire effects on remote clients. Call this on the server and local player. Network: Server and Local Player
InstantFire Source codePerforms an 'Instant Hit' shot. Also, sets up replication for remote clients, and processes all the impacts to deal proper damage and play effects. Network: Local Player and Server
IsActiveWeapon Source codeInforms if this weapon is active for the player
@return true if this an active weapon for the player
IsFiring Source codeReturns true if the weapon is firing, used by AI
IsFiring WeaponFiring Source code
ItemRemovedFromInvManager Source codeA notification call when this weapon is removed from the Inventory of a pawn @see Inventory::ItemRemovedFromInvManager
MaxRange Source codeReturns the Maximum Range for this weapon
PassThroughDamage Source codereturns true if should pass trace through this hitactor
PendingFire Source codePending Fire / Inv Manager
PendingWeaponSetTimer PendingClientWeaponSet Source code
PlayFireEffects Source codePlayFireEffects Main function to play Weapon fire effects. This is called from Pawn::WeaponFired in the base implementation.
PlayFiringSound Source codePlayFiringSound - Called after a shot is fired.
PlayWeaponAnimation Source codePlay an animation on the weapon mesh Network: Local Player and clients
@param Anim Sequence to play on weapon skeletal mesh
@param desired duration, in seconds, animation should be played
ProcessInstantHit Source codeProcesses a successful 'Instant Hit' trace and eventually spawns any effects. Network: LocalPlayer and Server
@param HitActor Actor hit by trace
@param AimDir Aim direction of shot
@param HitLocation world location vector where HitActor was hit by trace
@param HitNormal hit normal vector
@param HitInto TraceHitInfo struct returning useful info like component hit, bone, material..
ProjectileFire Source codeFires a projectile. Spawns the projectile, but also increment the flash count for remote client effects. Network: Local Player and Server
PutDownWeapon Source codeThis function is called to put a weapon down
RangedAttackTime Source code
ReadyToFire Active Source codeReadyToFire() called by NPC firing weapon. bFinished should only be true if called from the Finished() function
RecommendLongRangedAttack Source code
RecommendRangedAttack Source code
RefireCheckTimer Source code
RefireCheckTimer WeaponFiring Source codeTimer event, call is set up in Weapon::TimeWeaponFiring(). The weapon is given a chance to evaluate if another shot should be fired. This event defines the weapon's rate of fire.
RelativeStrengthVersus Source code
SendToFiringState Source codeSend weapon to proper firing state Also sets the CurrentFireMode. Network: LocalPlayer and Server
@param FireModeNum Fire Mode.
ServerStartFire Source codeWhen StartFire() is called on a client, it replicates the start by calling ServerStartFire. This begins the event on server. Server side actors (such as bots) should not call ServerStartFire directly and should instead call StartFire(). Network: Dedicated Server only, or Listen Server for remote clients.
ServerStartFire Inactive Source code
ServerStopFire Source codeWhen StopFire is called on a client, ServerStopFire is used to initiate the sequence on the server. Network: Dedicated Server only, or Listen Server for remote clients.
ServerStopFire Inactive Source code
SetCurrentFireMode Source codeSet current firing mode. Network: Local Player and Server.
SetFlashLocation Source codeThis function sets up the Location of a hit to be replicated to all remote clients. Network: Server only
SetPendingFire Source code
ShouldRefire Source codeCheck if current fire mode can/should keep on firing. This is called from a firing state after each shot is fired to decide if the weapon should fire again, or stop and go to the active state. The default behavior, implemented here, is keep on firing while player presses fire and there is enough ammo. (Auto Fire).
@return true to fire again, false to stop firing and return to Active State.
StartFire Source codeCalled on the LocalPlayer, Fire sends the shoot request to the server (ServerStartFire) and them simulates the firing effects locally. Call path: PlayerController::StartFire -> Pawn::StartFire -> InventoryManager::StartFire Network: LocalPlayer
StartFire Inactive Source codedo not allow firing in the inactive state
StillFiring Source codeThis function returns true if the weapon is still firing in a given mode
StopFire Source codeThis initiates the shutdown of a weapon that is firing. Network: Local Player
StopFireEffects Source codeStopFireEffects Main function to stop any active effects This is called from Pawn::WeaponStoppedFiring
StopWeaponAnimation Source codeStops an animation on the weapon mesh Network: Local Player and clients
SuggestAttackStyle Source code
SuggestDefenseStyle Source code
TimeWeaponEquipping Source codeSets the timing for equipping a weapon. The WeaponEquipped event is trigged when expired
TimeWeaponFiring Source codeSets the timing for the firing state on server and local client. By default, a constant looping Rate Of Fire (ROF) is set up. When the delay has expired, the RefireCheckTimer event is triggered. Network: LocalPlayer and Server
@param FireModeNum Fire Mode.
TimeWeaponPutDown Source codeSets the timing for putting a weapon down. The WeaponIsDown event is trigged when expired
TryPutDown Source codePut Down current weapon Once the weapon is put down, the InventoryManager will switch to InvManager.PendingWeapon.
@return returns true if the weapon can be put down.
TryPutDown Active Source codePut the weapon down
TryPutDown Inactive Source codecan't put down an inactive weapon
TryPutDown WeaponPuttingDown Source code
WeaponCalcCamera Source codeWeaponCalcCamera allows a weapon to adjust the pawn's controller's camera. Should be subclassed
WeaponEmpty Source codeCalled when the weapon runs out of ammo during firing
WeaponEquipped WeaponEquipping Source code
WeaponIsDown WeaponPuttingDown Source codeWe are done putting the weapon away, remove the mesh/etc.
WeaponLog Source codePrints out weapon debug information to log file
@param Msg String to display
@param FuncStr String telling where the log came from (format: Class::Function)
WeaponPlaySound Source codeThis function handles playing sounds for weapons. How it plays the sound depends on the following: If we are a listen server, then this sound is played and replicated as normal If we are a remote client, but locally controlled (ie: we are on the client) we play the sound and don't replicate it If we are a dedicated server, play the sound and replicate it to everyone BUT the owner (he will play it locally).
@param SoundCue - The Source Cue to play
| Defaultproperties |
|---|
defaultproperties
{
EquipTime=0.330000
PutDownTime=0.330000
bCanThrow=True
WeaponRange=16384.000000
DefaultAnimSpeed=1.000000
Priority=-1.000000
AIRating=0.500000
ItemName="Weapon"
RespawnTime=30.000000
bReplicateInstigator=True
bOnlyDirtyReplication=False
Name="Default__Weapon"
ObjectArchetype=Inventory'Engine.Default__Inventory'
}
|
| Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
| previous class next class | frames no frames | |||||