Worst-case scenario: the UEd Goblin wipes the map and burns down your house.

Legacy:Creating A Defense Point In UT200x

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

This tutorial will outline how to set up a very basic Defense Point in a UT2003 map.

Overview[edit]

Creating a defensive position for bots to defend in UT2003 is much more complicated than it was in UT. This is largely because of the fact that the system is much more powerful in UT2003 and allows for very complex defensive behavior like sniping a particular area, and I believe, although I haven't tested it out, setting up an area for a bot to patrol as opposed to a static position to hold. To create defensive points, you must first have a GameObjective of some sort. For most gametypes, you will be using a subclass of GameObjective. Examples of standard GameObjectives are the CTFBase for flags, and the xBombDelivery and xBombSpawn for the xBombingRun gametype.

Basics[edit]

Find the spot where you actually want the bot to defend, and add an Actor >> Keypoint >> AIScript >> ScriptedSequence >> UnrealScriptedSequence. This actor, once set up, will act exactly like simply placing a DefensePoint actor did in UT. Leave the large "AIScript" icon at the same height off the ground that it is place, and position and orient it where you want the bot to stand and face, respectively.

Now locate your already placed GameObjective that the defense point will defend, and Match These Tags:

  • The GameObjective's GameObjective -> DefenseScriptTags
  • The UnrealScriptedSequence's Events -> Tag

It's a good idea to use a meaningful tag, for example RedFlagDefense or RedGoalDefense.

By default, an UnrealScriptedSequence makes a bot go to its location, and look in the direction specified by its rotation. In most cases, this is all you need, and no changes to the default properties are needed (except for tagging the script properly to associate it with a GameObjective, such as a FlagBase).

At this point your defense points will work decently, but there are still several settings you should change to really get them working properly (and to really work at all if they're for CTF or BR, Domination points would probably work fine as-is).

Team Games[edit]

If you are making these defensive points for DOM game, or some other gametype where the GameObjective can change hands, go to your GameObjective actor, and Set The Following Properties:

  • GameObjective -> bTeamControlled = True

For any team game at all where the GameObjective belongs to one team only, Set The Following Properties:

  • GameObjective -> DefenderTeamIndex = team number of the team that will defend the GameObjective (0 for red, 1 for blue)

Optimizing Defense[edit]

Setting Priorities[edit]

Setting different priorities in GameObjective -> Priority will rank what percentage of bots assigned to defense will defend each GameObjective (the higher the number the more likely a bot will be assigned to it). Use this if you have some objectives that are more important than others.

If you want to have different priorties for different defensive positions, open up each individual UnrealScriptedSequence and expand the UnrealScriptedSequence tab in the actor properties window.

You can now modify the Priority field in UnrealScriptedSequence -> Priority (which works exactly like the priority field for the GameObjective, only now it will affect the bots who have already been chosen to defend the corresponding GameObjective).

Sniping Positions[edit]

For a sniping post, set UnrealScriptedSequence -> bSniping to True. You should probably also specify the WeaponPreference to the SniperRifle (which is what the Lightning Gun is referred to as in UnrealEd 3) or in UT2004 you can also use the ClassicSniperRifle (which is the real Sniper Rifle in UT2004). Remember to use only weapons that are actually available in the map.

Finally, make a "SnipingVolumeTag" with a corresponding Sniping Volume having its tag set to the same name. The volume is the area to snipe to, not from. The UnrealScriptedSequence's AIMarker (not placeable) is the sniping from point.

Notes:[edit]

There was a bug that prevented you from using more than three sequences per gameobjective in UT2003. This bug has been fixed in UT2004 so you can now use as many UnrealScriptedSequences as you desire. :)

Also it is good practice if you are using them on a large outdoor level to put a roadpathnode directly beside these actors because these actors will not reach far enough to connect to a distant node while a roadpathnode would.

Related Topics[edit]

Discussion[edit]