The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE3:UTVWeap_NightshadeGun (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> Actor >> Inventory >> Weapon >> GameWeapon >> UTWeapon >> UTVehicleWeapon >> UTVWeap_NightshadeGun
Package: 
UTGame
Direct subclasses:
UTVWeap_StealthGunContent, UTVWeap_StealthBenderGold_Content

Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.

Constants[edit]

NUMDEPLOYABLETYPES[edit]

Value: 4


Properties[edit]

AltFireModeChangeSound[edit]

Type: SoundCue

The sound to play when alt-fire mode is changed

bBeamHit[edit]

Type: bool

true if beam currently hitting target

bShowDeployableName[edit]

Type: bool


Counts[edit]

Type: int

Array size: 4 (NUMDEPLOYABLETYPES)


DeployableIndex[edit]

Type: int


DeployableList[edit]

Type: DeployableData

Array size: 4 (NUMDEPLOYABLETYPES)


DeployedItemSound[edit]

Type: SoundCue

Sound to play when an item is deployed

IconCoords[edit]

Type: UIRoot.TextureCoordinates

Array size: 4 (NUMDEPLOYABLETYPES)

Holds the text UV's for each icon

LinkBreakDelay[edit]

Type: float

Holds the amount of time to maintain the link before breaking it. This is important so that you can pass through small objects without having to worry about regaining the link

LinkedComponent[edit]

Type: PrimitiveComponent

Holds the component we hit on the linked pawn, for determining the linked beam endpoint on multi-component actors (such as Onslaught powernodes)

LinkedTo[edit]

Type: Actor

Holds the Pawn that this weapon is linked to.

LinkFlexibility[edit]

Type: float

Holds the amount of flexibility of the link beam

LinkStrength[edit]

Type: int

Holds the current strength (in #s) of the link

MinimumDamage[edit]

Type: float

minimum SavedDamage before we actually apply it (needs to be large enough to counter any scaling factors that might reduce to below 1)

Default value: 5.0

MomentumTransfer[edit]

Type: float

Momentum transfer for link beam (per second)

Default value: 50000.0

ReaccquireTimer[edit]

Type: float

This is a time used with LinkBrekaDelay above

SavedDamage[edit]

Type: float

saved partial damage (in case of high frame rate

VehicleHitEffect[edit]

Type: UTPhysicalMaterialProperty.MaterialImpactEffect


Default value:

Member Value
DecalDissolveParamName 'DissolveAmount'
DurationOfDecal 4.0

Victim[edit]

Type: Actor

Holds the Actor currently being hit by the beam

Default values[edit]

Property Value
AIRating 0.71
bInstantHit True
CurrentRating 0.71
FireInterval[0] 0.16
FireInterval[1] 1.5
FiringStatesArray[0] 'WeaponBeamFiring'
InstantHitDamage[0] 120.0
InventoryGroup 5
ItemName "Nightshade"
MaxFinalAimAdjustment 0.9
WeaponFireTypes[1] EWFT_Custom
WeaponRange 900.0

Subobjects[edit]

FirstPersonMesh[edit]

Class: UTGame.UTSkeletalMeshComponent

Inherits from: UTVehicleWeapon.FirstPersonMesh

No new values.

PickupMesh[edit]

Class: Engine.SkeletalMeshComponent

Inherits from: UTVehicleWeapon.PickupMesh

No new values.

Structs[edit]

DeployableData[edit]

Modifiers: native

class<UTDeployable> DeployableClass 
Class of the actors that can be deployed (team specific)
byte MaxCnt 
The Maximum number of deployables available to drop. Limited to 15
Object.Vector DropOffset 
How far away from the vehicle should it be dropped
array<Actor> Queue 

Functions[edit]

Static functions[edit]

GetImpactEffect[edit]

simulated static function UTPhysicalMaterialProperty.MaterialImpactEffect GetImpactEffect (Actor HitActor, PhysicalMaterial HitMaterial, byte FireModeNum)

Overrides: UTVehicleWeapon.GetImpactEffect

returns the impact effect that should be used for hits on the given actor and physical material

Events[edit]

Destroyed[edit]

simulated event Destroyed ()

Overrides: UTWeapon.Destroyed

Event called when weapon actor is destroyed

GetDesiredAimPoint[edit]

simulated event Object.Vector GetDesiredAimPoint (optional out Actor TargetActor)

Overrides: UTVehicleWeapon.GetDesiredAimPoint

GetDesiredAimPoint - Returns the desired aim given the current controller

Parameters:

  • TargetActor - out) - if specified, set to the actor being aimed at

Returns:

The location the controller is aiming at

PostBeginPlay[edit]

simulated event PostBeginPlay ()

Overrides: UTVehicleWeapon.PostBeginPlay

Initialize the weapon

Other instance functions[edit]

AttemptLinkTo[edit]

function AttemptLinkTo (Actor Who, PrimitiveComponent HitComponent)

This function looks at how the beam is hitting and determines if this person is linkable

BestMode[edit]

function byte BestMode ()

Overrides: UTWeapon.BestMode

BestMode() choose between regular or alt-fire

CanHeal[edit]

function bool CanHeal (Actor Other)

Overrides: UTWeapon.CanHeal

CanHeal() used by bot AI should return true if this weapon is able to heal Other

ChangeDeployableCount[edit]

function ChangeDeployableCount (int InDeployableIndex, int modification)

Adjust the amount of ammo available for the deployable 'ammo' by the modification value

CustomFire[edit]

simulated function CustomFire ()

Overrides: Weapon.CustomFire

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

DeployableUsedUp[edit]

function DeployableUsedUp (Actor ChildDeployable)


DeployItem[edit]

function DeployItem ()


DrawWeaponCrosshair[edit]

simulated function DrawWeaponCrosshair (HUD HUD)

Overrides: UTVehicleWeapon.DrawWeaponCrosshair

Draw the Crosshairs

FireAmmunition[edit]

simulated function FireAmmunition ()

Overrides: UTWeapon.FireAmmunition

Deactiveate Spawn Protection

GetDeployableCount[edit]

simulated function byte GetDeployableCount (int InDeployableIndex)

Return the amount of deployable 'ammo' available

GetFireInterval[edit]

simulated function float GetFireInterval (byte FireModeNum)

Overrides: UTVehicleWeapon.GetFireInterval

(Description copied from UTVehicleWeapon.GetFireInterval)
Returns interval in seconds between each shot, for the firing state of FireModeNum firing mode.

Parameters:

  • FireModeNum - fire mode

Returns:

Period in seconds of firing mode

GetHumanReadableName[edit]

simulated function string GetHumanReadableName ()

Overrides: Inventory.GetHumanReadableName


GetLinkedToLocation[edit]

simulated function Object.Vector GetLinkedToLocation ()

Returns a vector that specifics the point of linking.

HasAmmo[edit]

simulated function bool HasAmmo (byte FireModeNum, optional int Amount)

Overrides: UTWeapon.HasAmmo

This function checks to see if the weapon has any ammo available for a given fire mode.

Parameters:

  • FireModeNum - The Fire Mode to Test For
  • Amount - Optional] Check to see if this amount is available. If 0 it will default to checking for the ShotCost

NextAvailableDeployableIndex[edit]

simulated function bool NextAvailableDeployableIndex (int Direction, out int ResultIndex)

Returns index of next available deployable

ProcessBeamHit[edit]

simulated function ProcessBeamHit (Object.Vector StartTrace, Object.Vector AimDir, out Actor.ImpactInfo TestImpact, float DeltaTime)

Process the hit info

SelectWeapon[edit]

simulated function bool SelectWeapon (int WeaponNumber)


SendToFiringState[edit]

simulated function SendToFiringState (byte FireModeNum)

Overrides: UTWeapon.SendToFiringState

Send weapon to proper firing state Also sets the CurrentFireMode. Network: LocalPlayer and Server

Parameters:

  • FireModeNum - Fire Mode.

UnLink[edit]

function UnLink (optional bool bDelayed)

Unlink this weapon from it's parent. If bDelayed is true, it will give a short delay before unlinking to allow the player to re-establish the link

UpdateBeam[edit]

simulated function UpdateBeam (float DeltaTime)

This function looks at who/what the beam is touching and deals with it accordingly. bInfoOnly is true when this function is called from a Tick. It causes the link portion to execute, but no damage/health is dealt out.

States[edit]

WeaponBeamFiring[edit]

State WeaponFiring See UTWeapon.WeaponFiring

Modifiers: simulated

WeaponBeamFiring.BeginState[edit]

simulated event BeginState (name PreviousStateName)

Overrides: Object.BeginState (global)

Called immediately when entering a state, while within the GotoState() call that caused the state change (before any state code is executed).

WeaponBeamFiring.EndState[edit]

simulated event EndState (name NextStateName)

Overrides: Object.EndState (global)

When leaving the state, shut everything down

WeaponBeamFiring.IsFiring[edit]

simulated event bool IsFiring ()

Overrides: Weapon.IsFiring (global)

Returns true if the weapon is firing, used by AI

WeaponBeamFiring.Tick[edit]

simulated event Tick (float DeltaTime)

Overrides: Actor.Tick (global)

Update the beam and handle the effects

WeaponBeamFiring.EndFire[edit]

simulated function EndFire (byte FireModeNum)

Overrides: UTVehicleWeapon.EndFire (global)

When done firing, we have to make sure we unlink the weapon.

WeaponBeamFiring.GetAdjustedFireMode[edit]

simulated function int GetAdjustedFireMode ()


WeaponBeamFiring.RefireCheckTimer[edit]

simulated function RefireCheckTimer ()

Overrides: UTWeapon.RefireCheckTimer (global)

In this weapon, RefireCheckTimer consumes ammo and deals out health/damage. It's not concerned with the effects. They are handled in the tick()

WeaponBeamFiring.SetCurrentFireMode[edit]

simulated function SetCurrentFireMode (byte FiringModeNum)

Overrides: Weapon.SetCurrentFireMode (global)

Set current firing mode. Network: Local Player and Server.

WeaponBeamFiring.SetFlashLocation[edit]

function SetFlashLocation (Object.Vector HitLocation)

Overrides: Weapon.SetFlashLocation (global)

This function sets up the Location of a hit to be replicated to all remote clients.

Network: Server only