News / Archive
    About Us
    Staff
    Staff Login
    Links
    Spotlight
    Interview


    SP Maps
    MP Maps


    SP Maps
    MP Maps
    Mods
    Prefabs
    Tools


    Basic Mapping
    Advanced Mapping
    Basic Coding
    Advanced Coding
    ConEdit
    Other


    Forums
    IRC
 

8/12 - Deus Ex 3 on the horizon
5/31 - Deus Ex Machinima!
10/23 - TNM Has Moved!
8/5 - New Version of 3ds2de + Tutorial!
6/28 - Chronos Lives!
8/5 - 3ds2de Version 2
5/16 - Der Zeitmann - Manual Installation (For Mac)
4/3 - DXMP_Cargoyard
4/3 - DXMP_Prophecy_Underground
12/24 - DXMP_Duality
Pawns
By Trax2000
Date Created: 5/23/2002


Scripted pawns, also known as NPC's (non-player characters) are one of THE most important parts of a game. Without them you are just wandering around, nothing to kill, nothing to do. I will try to explain Pawns in their entirety today. Bare with me and my incredible typing skills here, set back, and let the learning begin.

First off implementing the Pawns into your level. create a level just as u would any other. just make a big box, that’s all you really need. Now, use the BROWSE bar to go to classes. Under pawn->ScriptedPawn-> u have many choices, from animals to civilians to bots. I recommend choosing a simple "thug" for the time being. Select your character form the sub menu. hold down A, and click in any of the 4 views. You now have your NPC. However right now its neutral, it will just wander around. and it can do nothing except run if u hurt it allot. BORING!

Inventory

Setting the NPCs inventory is essential if you want them to be able to fight, fight back, or even if u just want to be able to get something when you kill them. Right click on your character and go to properties. there is actually a tag for inventory. Go to initial inventory, then open up one or several of the 10 sub categories. note for some pawns these categories may already have items in them. Rather than entering long names and directories simply select the item from inventory in the classes menu and select "use" in one of the many columns under the Pawns inventory. You can also select number. Use this only for ammunition and for stackables such as lams. I set ammo to 99 for all my pawns because if they run out it becomes boring fast. Set the inventory appropriately, don’t arm a civilian with a GEP gun...

Alliance

If you notice all pawns you create are be default are neutral. They take neither side. Pawns can be set to say whether they like or dislike neutral (whether they attack them or leave them alone) but for the most part they don’t make any difference. This once again is BORING! Go to the alliances tab in properties, go to initial alliances. There are several, this is used to make complex scenes. The important windows in the subheadings for initial alliance are alliance name and alliance level. Alliance name is the name of the group. The player, you, is in group Player, to make them hostile u change none to "player" then u change alliance level. 1 is friendly 0 is neutral and -1 is enemy. You use multiple windows to do things like make 3-sided battles or simply to make enemy AI's not kill each other. Simply enter the name of a group you set and enter an alliance level. Under the object tag in properties you can add a pawn to a group to set its alliance. Not too hard right?

Orders

You can order your pawn to do many things. The base is wandering. Go to the orders

You can set orders to idle, pawn stands still and reacts to nothing, standing, pawn stands in one place and reacts normally, Dancing, causes pawn to stand still and play a dancing animation and spin periodically if hokey pokey is enabled, wandering, pawn wanders aimlessly, sitting, pawn sits in nearest seat, u can designate a seat, patrolling, a pawn patrols a set route. simply order them to Patrolling then set the ordertag to the name of their first patrol point, Patrol points must b added and set to point to each other. this isn’t hard and you should be able to figure it ou but i will include it in a separate tutorial along with pathnodes( after adding pathnodes or patrolpoints to F8 this time go to lighting and go to the paths option at the bottom). following, the pawn follows the player, and finally shadowing, the best yet, do not overuse this one it iwll kill it. It is where the pawn follows the player running if necessary but if the player turns around to look at them they wander aimlessly. Creates that weird paranoid feeling "is he following me?"

***NOTE*** For following and shadowing, "Player" must be entered as the order tag.

Reactions / Fears / Stimuli

Reactions - What the pawn reacts to, if all are false you can walk up to them jump around shoot them and they wont notice hostile or not, don’t do that, keep presence on for the least part, its lame if u can cross in front and they don’t see you.

Fears - they are what the pawn doesn’t like. Corpse weapons and injury just to name a few. Pawns will run from there fears. for a tough pawn don’t make them fear much or anything.

Stimuli - Its what the pawn hates, its what turns them hostile, it can be attacking them or simply the sight of a weapon. Stimuli turn pawns hostile temporarily if they aren’t already.

***NOTE***All three of these have their own subcategory under properties.

Combat

The combat feature in properties gives you a chance to spice up your character. Most of the categories are self explanatory. Some that aren’t, min health is how much health the character will feel comfortable with before fleeing. None of the others are either very hard to understand or very important.

Pathnodes

Pathnodes are very important, no level can do without them! Without pathnodes your pawns are morons, born and bred. Pathnodes allow pawns to navigate to a destination. Use them sparingly only when needed, like making a set around obstacles is important. don’t however sp[read them more than 700 unites apart, 350 on stairs, don’t place them between each other, and don’t forget to do F8 lighting, rebuild paths, before using the level, same as patrol points.

Tweaking Your Pawns

There are a few important things that aren’t big enough or important enough to get their own category. I will cover them here. AI tab in properties lets u really tweak your pawn. Most of the things are self-explanatory. The pawns AI brain when they set of alarms, do they spin when they dance etc. All these things can be found here. The pawn tab will let you set the pawns health and a few other features. Also in keypoints under the classes menu in the browsebar add some hidepoints. hidepoints are where pawns flee to after they have been seriously hurt. without them they run behind the nearest bit of geometry to get out of sight, this is unrealistic and jus plain dumb. You can use the scripted pawn tab to set if the pawn is invincible or not among other things. finally you can use the events tab and conversation tab to set names for your pawn so it can bark be included in conversations and be effected by triggers (like when all the UNATCO troops turn hostile in the NSF base).



Copyright 2001 | Design by AsylumX | Coded by Jim