Monsters, creatures and things will round-off this tutorial.
NOTE: This chapter is a compilation of many great information pieces found at different sources. If information provided here is your work - and you wish for the Special Edition to cease and desist - let us know and we will. Credit is provided and the end of this chapter to all sources where this information was obtained.
Special Note:Before you can place monsters, creatures and things - you need to know where they are. :-) In your object library, switch to the classes category, using the pop-down menu. Expand the Pawns class, then expand the ScriptedPawns class. You will find a full shopping cart of ghoulies you can throw into your map. :-)
At this point, your level is now basically complete for deathmatch games when played on the Internet with other players. However, to allow your player to use your level in a deathmatch game using robots or “bots” on his local hard disk, you need to add them - and tell them what to do.
The first item of business for this to occur, is that you need to give the other players “spawn” points. These are simply Player Start locations. If you have a single Player Start location, problems will arrise during a deathmatch game.
The first PlayerStart location placed into your level will be where the player will spawn in single player games and at the beginning of “botmatch” games. Each additional player start location will host your bots and other players during death match games on the Internet. Once a multi-player or bot game is in progress, players and bots will respawn at random player start locations.
At this point, go ahead and create several new player start locations throughout your level. Add an addition 15 locations to your first - you can place them practically anywhere. Ensure the player will fit in the location (remember, some players may be dressed and Skaarj or other large creatures.)
Also, be sure the player can exit from the player start location to get back into the action.
Once this is done, we will create pathnodes - the `railroad´ tracks that will allow your creatures and bots to move around with a purpose. Rebuild your geometry and save your map.
Pathnodes are what tell the bots and other Artificial Intelligence creatures in Unreal about your map. They cannot see or think like you, so they need instruction on where they can go and what they can do.
There are many ways to add pathnodes to your level. However, to ensure clarity, this tutorial will take you on what some may call the “long way around.” Adding pathnodes will be a lot like adding your decoration and lighting. You will be working from your camera view - following along your map and adding these pathnodes.
In your object library, select the classes category. Within classes, select NavigationPoint > PathNode.
Find a good starting location and navigate your camera to that area. To add a pathnode, right-click the floor surface and choose “add PathNode here.´ You will see an apple icon. When adding pathnodes, keep in mind that all pathnodes must be visible from the adjoining pathnode. In other words, if you are standing on a pathnode, you must be able to see the next pathnode you can go to. Pathnodes are nothing more that “dots” in a connect the dots puzzle. However, you must see each dot from the previous dot - and one dot can lead to several other dots.
You may get a warning that the “actor does not fit here” - in which case, you need to move the pathnode to the side or away from the offending structure. Continue cruising through your level, dropping pathnodes like bread crumbs. Remember that each pathnode must be visible from the previous pathnode - and place them no more than 600 units away - the closer, the better.
For security, place a pathnode on each of your playerstart locations, too.
Once you have your pathnodes all set, Click the Window menu and select Log. This is a command prompt window. Scroll to the bottom of the list and enter the following command:
paths define
As explained by Myscha the Sled Dog on Unrealized: “The editor will now begin scrolling through and analyzing all the pathnodes and begin generating "reachspecs" and Inventoryspot markers.”
Once the log calculations are complete, select the view menu in any of the axis or camera views and choose “show paths.” Your map, in that view, will display a series of red and blues lines.
Red paths are good for your bots. They will have no problem (theoratically) navigating these pathnodes. If a line is missing between two or more pathnodes, you may want to add more pathnodes in that area.
Blue paths are ar really good thing. Blue means the larger creatures can also nevigate the path. This is necessary for the monsters and such you will add for your single-player game - not to mention those deathmatch players wearing monster outfits.
Myscha suggests you play the map in a team game - and follow one of the bots around to ensure it is getting to areas you intend to be accessible to them. A note about doors and lifts: if you want your bot to be able to travel through doors, be sure to place pathnodes right next to the door - on both sides and be sure the path crosses over the trigger that opens the door.
As for lifts, there are two special `actors´ called Lift Exit and Lift Center. These tell your bots how the lift works. These are pretty self explanatory: Place a lift exit immediately next to the lift and a lift center in the center of the lift - one at the top and one at the bottom.
LiftCenter: The LiftTag should be set to the tag of the lift it is on. LiftExit: LiftTag should be set to the tag of the lift they are associated with.
Myscha offers these tips on pathnode placement:
- Always place one path at the top and one at the bottom of a stair or ramp. If the ramp is longer than 512 units you may need a pathnode or two along the way. Be sure to select any paths added along the run of a ramp and slide them downward so that their collision box is not partially inside the ramp.
- With narrow openings between columns or arches, place one path on either side and not one path in the middle of the arch. Look at DMTundra's arch pathnode layout for an idea about this.
- Think in 3D - If a path is along the bottom of a pool of water-the creature will need to be able to see a path out of the water to figure out how to get out. Make sure water to dry land paths connect up.
- If you move or add a pathnode you must "define paths" again repeat [the instructions provided] above.
- Bots run at the same speed as the player, and can jump just as far. If you see any "shortcut jumps feel free to place paths there. The bots will understand these and make the jump.
- Bots LOVE the Shield Belt - If they tend to hover around it too much-place it in a HIGH COMBAT area so they will all kill each other rather than camp on it.
- Keep paths about 32-48 units off the walking surface.
- Bots have better vision than you in regards to light and darkness-remember that when you play.
To help you understand the placement of pathnodes more clearly, the following is a quote from Tim Sweeney´s Unreal Creature care and Feeding Guide - it is strongly recommended you obtain this document as it will give you far greater insight into the Unreal AI system and provide you with incredible ideas:
All navigation points have a bPlayerOnly attribute. If set to true, it means that only Players (bots) will use this path for navigation. Its not perfect, but if you put two in a row along a hallway with turns, it will probably keep the creatures from going through that hall. Exceptions are if the creature is close behind a player and in hot pursuit, or if he is already very close to the path when he tries to use navigation
LiftCenter: Place this Navigation Point at the spot on a lift you want the creature to stand while using the lift. Its LiftTag should be set to the tag of the lift it is on.
LiftExit: LiftExits should be place at the spots you want creatures to wait before getting on a lift. Their LiftTag should be set to the tag of the lift they are associated with.
Any creature can be made to play any animation with Patrol Points or Alarmpoints - covered later in this chapter.

Creating a mover that follows a path is done by using path points. This section of Special Edition was written by Lurch and found at UnrealNation:
1. Make a mover and don't give it any key frames.
2. Add in PathPoints [under Keypoint], and under their properties go to PathPoint and give the numbers starting at 0 through as many as you want (but you can't have more than 33). They're two other var. in this area, curveSpeed and speedU. First the curveSpeed is for how fast the brush will rotate and second the speedU is how fast the brush goes through the PathPoints.
3. Now add an ObjectPath (it doesn't matter where) open its properties and go to ObjectPath. Under PathActorTag give it the Tag of your mover. You also need to go to advanced properties and set the static var. to false. You will also notice under ObjectPath that there are 4 other fields bAlterPitch, Roll, Yaw, and Radjust. If you set the Pitch, Roll, and Yaw to true then the mover will move in the proper way to the way the PathPoints are placed. And Radjust is to set the initial state of the mover.
4. Now select all PathPoints, and the ObjectPath, and give them all the same Tag under Events.
5. Make a trigger and give it the event of the PathPoints, and the ObjectPaths tag. And there you go!
The way this works is kinda weird, when using the object path method Unrealed makes a bezier spline between the PathPoints but the mover will actually start at the second PathPoint and stop at the second to the last PathPoint. It uses the first and last PathPoints for directional purposes.
Submitted by Lurch @ Screaming In Digital www.unrealnation.com/sid/
Monster and Creatures
Monsters and creatures are usually used for single player games. One of the tricks with these actors is getting them to roam around or hunt other creatures and players in a logical manner.
Ater placing a creature in your map, open the properties box for him. In the orders section, set the bFixedStart to false. In the Orders field, enter “roaming” - without quotes. This creates a monster that will roam around without the need of pathnodes or patrol points.
Based on the previous chapters of this tutorial, you will see there are many variables for creatures. These variables will not be explained here as you should, by now, be accustomed to experimenting with these settings. Beside that, the Creature Care and Feeding Guide contains very detailed information about these settings.
A Thing or Creature Factory will allow you to heave creatures at the player - one after another. Because the creature will “appear” out of nowhere, these factories use spawn points that should be placed in a location not directly visible to the player. Around an inaccessible corner or on an inaccessible ledge would be a good idea.
Factories are usually triggered. The triggers event that matched a factory´s tag will initiate that factory. A factory is also a trigger in itself, as it will begin producing when the player touches it. Here, your own imagination and creativity is the limit. Each factory can have up to sixteen spawn points and is activated via a trigger. An example might be a zone trigger, where the player enters a zone, the zone info´s event triggers a factory´s tag - thereby causing the factory to produce its things or creatures. Furthermore, each spawn point can trigger another event - when a creature or thing is spawned from that point, the event is triggered.
The possibilities are boundless! See the quickie tutorial for a thing factory near the end of this chapter.
When a creature or thing generated by a factory is killed or dies - its default event triggers the factory to spawn another thing or creature. The factory properties are:
Prototype: The thing or creature this factory produces MaxItems: This is the number of creatures or things that will be allowed in the world simultaneousely from this factory. If the factory is a creature factory - it will create all the creatures initially - then recreate the creatures - up to the maxitems allowed - as each existing creature dies - up to the capacity of the factory. Capacity: This the the maximum number of things or creature this factory will produce. When this limit is reached, the factory will shut down. If a value of -1 is enetered, the capacity is unlimited. AddedCoopCapacity: If the game is cooperational, these are added items to be produced beyond the capacity. Interval: The average time length between spawns. timeDistribution:
Dist_Constant: Always equal to Interval Uniform: Random time between 0 and 2 x interval Gaussian: Mean = interval
bOnlyPlayerTriggered: (True by default) - self explanatory bCovertL: Only performs hidden spawns. Defaults: Creature = True / Thing = False bStoppable: The factory will stop if touched Orders: (Creature only) - these will be the creature´s orders OrderTag: By default they will attack the instigator of the factory. ItemTag: Tag given to items produced by this factory AlrmTag: (Creature factory only) AlarmTag given to creatures produced by this factory
Myscha´s tips:
Creatures should be spawned for a logical reason - for example they should NOT simply appear in thin air. Spawn them inside of structures and have them come out. Like out of ceiling ductwork etc. Remember the Creature Factory actor itself can be used to trigger it. You'll need to adjust the collision radius to work well if so. The TAG of a creature factory must match the TAG of the spawnpoints (this is unique to creature factories normally it would be event to tag)
Myscha offers these pointers on Patrol Points and Alarm Points:
Patrolling
Patrolling creatures will patrol along a set of Patrolpoints (a subclass of NavigationPoint) specified by the level designer. The creature's OrderTag should contain the tag of the first Patrolpoint in its patrol. When a creature reaches a Patrolpoint, it will pause for the PauseTime specified in the patrol point, facing in the direction the Patrolpoint is oriented. While pausing, it will play waiting/patrolstop animations. If a PatrolAnim is specified, the creature will play that specific animation the number of times specified by NumAnims. Each time it plays the animation, it will also play the PatrolSound if one is specified.
Note that the amount of time creatures playing a PatrolAnim pause depends on how long it takes to play the animation NumAnims times, and not the pause time. However, the PauseTime must still be set to a positive number. It will then continue to the Patrolpoint specified in the current Patrolpoint's NextPatrol. If a creature cannot reach the next patrol point, it will wait at its current position. If bFixedStart is false, the creature will start at some random point along his patrol route (not yet implemented).
Alarm Points
Alarmpoints are designed to be used in conjunction with the alarmtag to cause creatures to perform complex actions upon seeing a player. If the Alarmpoint's event is set, it will trigger all creatures with that tag when the alarm creature reaches the Alarmpoint. The attributes are:
NextAlarm: The next alarmpoint to go to after this one. If none, the creature will revert to normal AI after completing the actions specified by this point. PauseTime: How long to pause at this alarmpoint. DuckTime: How long to pause after playing the AlarmAnim (only used if an AlarmAnim is specified). Its called ducktime, because a typical use would be to have the creature duck, wait for ducktime, and then stand up and shoot (if bAttackWhilePaused is true). If you want to the creature to track the player while ducking, be sure to set bAttackWhilePaused. AlarmAnim: If specified, the creature will play this animation upon reaching the alarmpoint, as well as the AlarmSound if specified. bStrafeTo: If true, and the creature can strafe, then the creature will strafe to this AlarmPoint, facing the enemy player. If the creature has a moving attack, it will fire while strafing if it has a clear shot. bAttackWhilePaused: If true, the creature will shoot at the player while paused (unless he has a ShootTarget). If the player is not visible, the creature will fire at where he last saw the player. bNoFail: If true, the creature will never give up trying to get to this Alarmpoint (just as it never gives up trying to get to other alarmtag actors). If false, and the creature gets knocked off its path, it may give up if it can no longer easily get to the alarmpoint. bStopIfNoEnemy: If true, and the enemy is not visible, creature will stop at this Alarmpoint until it sees the enemy again. Otherwise, it will continue progessing through the Alarm actions. bKillMe: Any creatures that are triggered by this alarmpoint (their tag = the alarmpoint's event) will hate and kill the triggering creature, even if they wouldn't normally. bDestroyAlarmTriggerer: When a creature reaches this alarmpoint (and it is the creature's alarmtag destination), the creature is immediately destroyed. ShootTarget: If bAttackWhilePaused is true and ShootTarget has the tag of some actor, the creature will fire at that actor rather than the player. AlarmSound: If an AlarmAnim is specified, the AlarmSound will be played in conjunction with the AlarmAnim.
The animations available and their names are indicated in the MESH VIEWER.
A quickie Thing Factory tutorial:
Create a simple map: two rooms, one large (200x800x800 (height-width-breadth)) and a smaller, but deeper hallway (200x800x100) - attach the hall to the main room at one of the corners and add lights.
Add the following items:
A PlayerStart - near the far corner away from the hallway. A large cube or other object - in the center of the room. A SpawnPoint (under NavigationPoint) - inside the hallway at the far end away from the entrance. A Thing Factory (under keyPoint) near (but not inside) the cube at the center of the large room.
Open the properties for the Thing Factory and set the following:
bCovert = false : This allows the thing factory to spawn things even though you are looking at it. bFalling = false : This will not force the thing to fall to the floor. MaxItems = 1000 : Allowing 1000 items in the world simultaneousely. Prototype = Class'Unreall.WarlordRocket : Select this from the “Projectile” classes.
In the Events section, set the TAG to “Rocket” - without quotes.
Open the SpawnPoint´s properties and set its TAG to “Rocket” - without quotes.
Rebuild geometry and save the level. Press CTRL-P to play. Walk around the cube until you trigger the thing factory and you will see a major volley of rockets spitting out of the hallway. :-)
NOTE: The Special Edition in whole is copyright 1998, Ron Andrade, A.K.A. Gadget Factor. Portions are copyright by their respective owners: Planet Unreal Unreal Kingdom Unrealized UnrealNation
Also: Special thanks to Epic Megagames Epic Megaboard and its contributors Tim Sweeney Myscha the Sled Dog |