No i didn't want it to pop up in the middle of the firefight. Just upon the death of 1 (the only) guy in the room. Ive managed to get the below idea to work for everything except for the story mode!! (thanks by the way TZap)
Thanks for your v fast response though orrion carn!
In some fps games I have played, you cannot open certain doors until an area in the current level has been cleared of all enemy characters. This is a solution in fpsc.
You will need to select a character and change their fpe file so I suggest making a copy of it and (if it exists) the bin file. Use the copied fpe file in the following process. When you view the entities in the map editor, you should see the copied character available for selection.
Using Wordpad to edit, add the line ifused = box to a characters fpe file in the ;ai section. Box is an entity we will use for a 'counter'.
In this example, I am going to use 3 copies of the same character.
Add the 3 characters to a game and change the destroy script to destroyandactivate.
Add a box entity to the game and change the name to box. Make sure you cannot use or destroy the box. It needs to be dynamic and zero strength (indestructable). Probably does not matter too much about it being movable but also ensure the name of the box is unique.
Add the following script to the box as its Main AI:
desc = Counter
;Triggers
:activated=1:incstate=1,activate=0
:state=3:activateifused=1
;End of Script
Change the IfUsed parameter to Door.
Add a Door to the level and ensure its main ai is doorremote and its name is Door.
When you shoot the 3 characters, the door will open.
You can do this for more characters. For 5, ensure the box script has state=5 in place of state=3.
This does open more ideas (and not just doors!) maybe have a key or weapon upgrade appear.
Also it could speed games up. Only allow progession (and more characters to spawn) once an area has been cleared.
Same S**t, Different day, Just every day it gets a little deeper.