MCS' Coding Tips
                 "Success!"



  
Frozen bosses and how to avoid them

   Written by MCS
   Tested by Quinnsey


   
Main Page

News

Wolfenstein 3D
Texture Library


MCS' Coding
Tips - "Success"!


Utilities

Spear
Resurrection


Wolfendoom

Wolf
Collection


Original Wolf 3D

Doom/Duke
maps


Other Stuff

Links

Questions?
Email us!
You won't find them in the regular levels of the original Wolf. But if you played a lot of add-ons, you should be pretty familiar with them, the frozen bosses!
You open a door or go around a corner, and there he is, the boss stands right in front of you as some kind of dumb statue.. and he won't react until you move to a particular area or fire a shot at him.

The reason for this? Well, although bosses do face the player all the time, the engine assigns "start directions" to them at spawn time.
This might look OK when dealing with normal guards, but it looks a bit stupid with bosses.
Of course you can adjust your level designs to match the "built-in" direction for each boss, but that isn't always possible.

You can change this setting for each boss individually. Let's say you want to remove the start direction for Hans Grosse. Here's how to do it:


Open WL_ACT2.C and locate the SpawnBoss routine:

void SpawnBoss (int tilex, int tiley)
{
unsigned far *map,tile;

SpawnNewObj (tilex,tiley,&s_bossstand);
new->speed = SPDPATROL;

new->obclass = bossobj;
new->hitpoints = starthitpoints[gamestate.difficulty][en_boss];
new->dir = south;
new->flags |= FL_SHOOTABLE|FL_AMBUSH;
if (!loadedgame)
   gamestate.killtotal++;
}


And replace the white line with:

new->dir = nodir;

That's all. Compile and link up. Make a simple level design with Hans Grosse in the middle of a room that can be accessed from all directions north, south, east and west. Try each of those doors, and Hans should react on you the same way each time.

Success!
MCS.