| Home Page | Recent Changes | Preferences

Firing InstantFire Weapons

How UT2003 Weapons Work: InstantFire Weapons.

I will try to make a path through the many calls of shooting a instant hit weapon. More specifically, a Shock Beam Rifle.

In UT2003 the Instant hit weapons are AssaultRifle, Minigun, ShockRifle?, and the SniperRifle. An instant hit weapon is the one that have no projectiles and you cannot dodge its shots once they were fired.

Here is the continuation of the function call chain:

InstantFire.DoFireEffect()

  • Finds out where the start of the hit trace will be;
  • Calls DoTrace;

InstantFire.DoTrace(StartTrace, R)

  • This function tells where we hit;
  • Take care of the beam reflection;
  • Applies damage
  • Call the creation of the visual effects;

ShockBeamFire.SpawnBeamEffect(Start, Dir, HitLocation, HitNormal, ReflectNum)

  • This one creates the visual effects in this line:
Beam = Spawn(BeamEffectClass,,, Start, Dir);
  • Set where is the destination of the beam with
Beam.AimAt(HitLocation, HitNormal);

ShockBeamEffect.AimAt(HitLocation, HitNormal);

  • Define where your beam is going (the mSpawnVecA vector is the hit location)
  • Create the effects in the hit location with the SpawnEffects function.

ShockBeamEffect.SpawnEffects()

Here is where the effects are created. For the ShockRifle, these are the effect classes:

Effects spawned in the hit location:

ShockImpactFlare?, ShockImpactRing?, ShockImpactScorch?, ShockExplosionCore?

And this is the beam itself:

ShockBeamCoil?

Flowchart

Comments

Tarquin: The flow chart is a great idea, but now I've looked at it closely, I see that it is mostly linear – it looks more complex than it is because of the way some lines turn corners so it can all fit in the image. I think it might be an idea to try & make this in text with nested lists.

Bananna_Manuk: Hi i`m totally new to unreal script but i think more flow charts like this one really help get a grip whats going on.. some times a page full of text is a little daunting to some body such as myself still trying to get to grips with the basics ... Great job really helped

OlympusMons: I agree flow charts for me are alot easier to follow. Ive actually had to try and write some out so its easier for me to learn how all the unreal script classes interact, not an easy task. I hope some of you pro's might be able to lend a hand here. I can help a little myself but I'll be learning as we go. Mind you I have done databases in access and particle flows in max 6 so I know a bit about flowcharts.

T1: I see a mistake but I'm not quite sure how to reword it.... anyway, ShockBeamCoil is NOT the shock rifle's beam. ShockBeamCoil is that ribbonlike thing that twists around the beam on higher detail levels. ShockBeamEffect is the actual beam, and it additionally spawns the hit fx and the coil. Also the title of this page should be Firing_InstantFire_Weapons(UT2003), because it doesn't apply to UT2004 and definitely not UT99.

OlympusMons: Maybe we can come up with two more flowcharts to add to this ut2k4, ut99. Ive noticed there are calls for a weapon tutorials for ut99 and Im sure ut2k4, this would probably be helpful to anyone trying to make tutorials or weapons. :P

RegularX: Thankfully there are few things as complicated as firing a weapon. Which seems odd for an FPS, but there you go.

CanadEHn: Would it be possible to spawn multiple beams in different directions, at the same time? I have made a firing class that shoots a beam in a random direction, but I cannot find out how to spawn multiple beams at once, all in random directions.

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In