Removing a Door

From Bots-United Wiki

Jump to: navigation, search

How to remove a Func_Doors

Sometimes a door creates a barrier that the bots can't handle. For example in md_bridge the team door at the storage building prevents the bot engineers from blowing the wall. If the bots understood Covert-Op+Engineer co-operation this would not be an issue, but there is no good way to to effectively team up the bots in this way. And with this being an important part of the play, removing these doors becomes worthwhile for this map.

Using Hobbit's bsp reader the names of these func_door entities can be found thus;

Image:Finding_A_Scriptname.JPG

And the following code is then added to the end of the map script file

storageentrance_allies //func_door "scriptname" found inside md_bridge.bsp
{
	spawn
	{
		wait 200
		remove //or use: trigger self death
	}
	death
	{
		remove
	}
}

storageentrance_axis
{
	spawn
	{
		wait 200
		trigger self death 
	}
	death
	{
		remove
	}
}

Note that the doors are removed at spawn after a suitable short (200 mSec) delay. The 2 cases are equivalent, trigger self death calls the death block which then executes the remove command.

Here is a view of the result.

Image:func_door_remove.jpg

Note: This method does not use the entity number so it is not affected by the addition of new spawns or fake entities and their trigger_objective_infos.

Permanent link to this page

Retrieved from "Removing_a_Door"