Skip to main content

Creature and Pathing Tips

Level Design Tips

Pathing Enemies

Hellscrag writes: It's not just bots that respond to PathNodes. An Unreal SP map can benefit greatly from good pathing for the enemies - right down to letting them use lifts. I made heavy use of AI-configured lifts in Deja Vu. Proper pathnoding also makes light work of PatrolPoints and AlarmPoints, as you already have an established network of routes for the AI to follow. Just one PatrolPoint at each end of a patrol route will normally do, although middle point(s) are sometimes required if the creature takes the wrong route from point A to point B.

In terms of pathing around an obstacle, you have to think in terms of how you'd walk around it yourself. Creatures walk in straight lines between pathnodes / patrolpoints, so you probably want pathnode placement around the obstacle to look something like this:






You do, of course, have to "Rebuild Paths" in UnrealEd before your pathing will work. You can check the soundness of your pathing by right-clicking on the top bar of a viewport in UnrealEd and selecting View > Show Paths. Blue lines represent sound paths that can be followed by creatures, but red lines are only suitable for bots. If there is no line at all, your points are too far apart - add another couple of pathnodes along the way.

Ambushing the Player

Lightning_Hunter writes: A great way to have creatures run to their alarmpoints even when they do not see the player is to set the creatures attitude toward player to ATTITUDE_Ignore, set bHateWhenTriggered to True, and give the creature the same tag as a triggers event. When the player walks through the trigger, the creature will run to its alarmpoint no matter what. This is also a good technique even without alarmpoints, because it makes the creature dash toward the player when the player touches a trigger. This makes for good surprise attacks.

You can randomize the placement of creatures by using 2 methods (the second method is not as well known). The first method is as follows: Place a creature down in one of their possible starting positions, and give the creature the orders "Ambushing". Next, give the creature a unique ordertag. Ambushpoint actors should now be placed in every spot where you want the creature to randomly start. Now give each AmbushPoint the same tag as the creatures ordertag. When the map starts, the creature will randomly chose one of the AmbushPoints (or the point where the creature was originally placed) to start.

Method #2 might give the player more of a surprise: Place SpawnPoint actors down in every possible spot for a creature to start. Next, place a CreatureFactory (or ThingFactory) somewhere before the room where the creature/s will be. Make sure the creature factory is placed in a spot where the player will trigger it; also, make sure the spawnpoints are out of site when the player triggers the CreatureFactory. Next, set the "prototype" under the ThingFactory properties to the creature you want to spawn. Now, you should set the capacity and max items to the amount of creatures you want to spawn. Both numbers should be the same so that the creatures all spawn at the same time. Next, set the "interval" to 0.000001 (it does not work if set to 0 for some reason, so add a 1 in there somewhere). You might also want to set "BonlyPlayerTouched" to True so that other pawns can't trigger it. This should be it! What this does is make the creatures chose a random SpawnPoint to appear in whenever the player triggers the CreatureFactory. The difference between this and Method #1 is that every time the player enters the room, the creatures will be in a different spot! If the player dies in that room and loads a saved game, they will burst into the room assuming the creatures are in the same spot as last time, bug magically, they moved! You could also change the probability that the creature factory will appear by editing "OddsOfAppearing" in the Filter Properties of the CreatureFactory. This will make it so that the monsters will only appear sometimes, randomizing the placement even further!

Creature Factories

Waffnuffy writes: Let's face it. Too many maps now have their pawns placed with just Right Click >> Add [Monster] Here procedures. There are better ways to give your maps more dynamic combat and to give them realism. One way is to use patrol points so your pre-placed creatures walk around a specified path, doing certain things (at Patrol Points: sounds, animations, etc). Another way is to give your creatures Alarm Points so that when they see you, they go run and do certain things, which usually means bad stuff for the player. Still another is to simply place creatures in certain areas and to then give them Home Base actors to run to or Ambush Points in the FirstHatePlayerEvent field, so that they will get into a more secure location when they see you. But one thing you don't see a lot of is giving these kinds of properties to SPAWNED creatures.

In the CreatureFactory properties, there are enough options to give spawned creatures Alarm tags and Patrol tags, which suffices for most situations (unfortunately, there is no FirstHatePlayerEvent field in CreatureFactories). Here's something you could do which is easy to set up; almost (this is UED we're talking about) fully-guaranteed to work; and adds subtle dynamic elements to your gameplay. Let's take the Sunspire for example, since we all know its structure and locations. I've been modifying it for some other stuff I'm making, and here's a type of situation I could make.

First the player walks into the main entryway from outside on the covered platform. Inside there are lots of things to kill; various enemies trigger creature factories when they die to start producing enemies. Instead of just having enemies dump out of spawnpoints and sit there until the MaxItems limit has been reached, waiting to be killed so more pawns can be dumped out, other more interesting things can be made. For example, the player leaves the main hub room and explores, say, the Bathing Chambers. While he is away, spawned creatures with a Patrol tag set may spawn in the room directly above the hub and jump through the broken glass hexagonal window down to the hub room, where they will hang out at the patrol point. And that's another thing; you can very well just have one Patrol Point as a meeting place for several different creatures coming from different spawnpoints to rally at. This adds some beefed up combat when the player returns to find five Skaarj Lords standing around.

Simultaneously, gasbags are produced. These can be given a more diverse patrol path, allowing them to float around and guard various areas. Pupae may spawn, and they may jump down the window as well, but walk around the hub room lazily searching for meat. Another Skaarj may spawn, come down to a different patrol point, and stay there, on guard; when he sees the player, the other creatures in the room attack, and he runs off with his Alarm path to a trigger which spawns more enemies to come in from other locations via their Patrol paths, and he comes back at the same time. This could result in the player being attacked from all sides for some very realistic and very challenging combat. Now, you wouldn't normally want 30 things attacking the player the way I do (for EXU, if you wondered), but you can make watered-down versions of this situation and modify it extensively for your own doings in your own maps.

As a result, you no longer just fight pre-placed creatures that stand around and wait for you to arrive and kill them. And of the pre-placed creatures that you do have, they have roles; they alert other creatures or run and hide in secure ambushing areas, so the player doesn't know what to expect. And better yet you can give creatures a choice of two or more Ambush Points / Home Bases so that they will go to different areas each time, giving the map even more replay value. In addition to the enhanced interaction with pawns, you have new pawns come in to the map at designated times, doing special things, making the map much more than just a run-and-shoot kind of place.

Krall and Dice

Naveed asks: Ok, how to I make a group of krall play dice?

Hellscrag replies: Under AI in the Krall's properties, set a value for "teamtag" that is the same for all the Krall you want to be involved. Then set each one to bDicePlayer=true under "Krall"

Techno_JF adds: Note about Krall with dice: One member of the team has to be set as the team's leader. This leader will create the pair of dice that the team uses. I'm not completely sure of this, but I don't think it will work at all if the team doesn't have a leader.