My program doesn't have bugs. It just develops random features.

Legacy:TheHealer

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

This tutorial is written under UT2003 build number 2225.

A New Weapon: The Healer[edit]

Actually, the name is a bit misleading. The first firemode will heal a friendly unit, while the second will damage an enemy unit. Our main objective in this tutorial is to set up a working weapon with custom properties, which will be outlined below. Although this weapon is based off of the Link Gun, it does not extend the Link Gun – it extends Weapon. Don't worry, it'll all make sense in the end.

  • In UT2004, the secondary (beam) of the Link Gun is used to heal vehicles and Onslaught control points.

Prerequisites[edit]

You must be familiar with the following pages/concepts to use this tutorial successfully.

Preferences[edit]

This tutorial will not require any particular IDE, but an IDE is definitely recommended. See Setting Up UnrealScript for a list of good ones, IDE for an explanation of 'em, and WOTgreal for this author's personal favorite.

Each page of the tutorial will feature the complete code for each class, but getting them to work right together in your compliler is up to you, since this isn't written with any particular IDE in mind.

Let's Get It On![edit]

Our Healer will have the following properties.

  • Primary Fire – A solid green beam that will heal a friendly unit.
  • Secondary Fire – A solid red beam that will damage an unfriendly unit.

Your Package: The tutorial will assume the following about your directory structure:

  • TheHealer will refer to your package directory.
  • {Base Directory} will refer to your UT2003 folder and it's location, be it C:, D:, or whatever – {Base Directory}/TheHealer.
  • Under /TheHealer resides the classes folder – {Base Directory}/TheHealer/classes. This is where each of the 8 .uc files we're going to create are going to live.

This is the complete list of all the pages in the tutorial. Each page will have this list along with the next step at the bottom. Each page (except for the last) represents a class, and each page name is also the name of the class.

Parts 1-6 are now live. I know I was going to have the rest done on Saturday, but I've been nursing a cold. Bear with me  :).

  1. Legacy:TheHealer/TUTHealer – Our main weapon class.
    1. Filename: {Base Directory}/TheHealer/classes/TUTHealer.uc
  2. Legacy:TheHealer/TUTHealerPickup – Our weapon's pickup class, what you see on the ground.
    1. Filename: {Base Directory}/TheHealer/classes/TUTHealerPickup.uc
  3. Legacy:TheHealer/TUTHealerAmmo – Our weapon's ammo class.
    1. Filename: {Base Directory}/TheHealer/classes/TUTHealerAmmo.uc
  4. Legacy:TheHealer/TUTHealerAmmoPickup – The ammo's pickup class, what you see on the ground.
    1. Filename: {Base Directory}/TheHealer/classes/TUTHealerAmmoPickup.uc
  5. Legacy:TheHealer/TUTHealerFire – Our weapon's primary fire class.
    1. Filename: {Base Directory}/TheHealer/classes/TUTHealerFire.uc
  6. Legacy:TheHealer/TUTHealerAltFire – Our weapon's alternate (secondary) fire class.
    1. Filename: {Base Directory}/TheHealer/classes/TUTHealerAltFire.uc
  7. Legacy:TheHealer/TUTHealerBeamEffect – The Healer's Beam Effect
    1. Filename: {Base Directory}/TheHealer/classes/TUTHealerBeamEffect.uc
  8. Legacy:TheHealer/TUTHealerAttachment – Our weapon's attachment class.
    1. Filename: {Base Directory}/TheHealer/classes/TUTHealerAttachment.uc
  9. Legacy:TheHealer/TUT The End – Putting it all together.

Important: If you decide to change the package directory name, the script filenames, the class names, or anything else that I've outlined here, make sure you pay close attention to each change throughout the process. Sometimes these things can sneak up on you :)


Discussion[edit]

RegularX: There is a weapon (Aura Rifle) in the xxxpak that also does this, albeit it's a bit crude and high on my rewrite list.

GRAF1K: Ah, but there's no AuraRifle tutorial, is there? ;-)

RegularX: No, because the author of the xxxpak is a lazy SOB ;). This tute is looking quite nice DanC, good work on organizing a really complete weapon tute.

Tarquin: Could you use Base Directory instead of your BaseDir/UT2003 thing please? See that page for details.

HSDanClark: I didn't know that page existed or I would have  :) I'll go through and make the changes on the other pages in a little while.

Tarquin: Cool. See, we think of many things on the Unreal Wiki :D

Tarquin: How many of the class subpages are actually written? I've just followed 2 of these links to find pages with no content.