By the way I believe it's also possible to do elseif query types now (in 5.x at least). When you create an if query action part there should be a "elseif" checkbox in the parameters. What this allows you to do is create a bunch of if or else based queries which only require you to add a single end if action part right at the end of the list.
if value 'examine_door' is 0
do something
else if value 'examine_door' > 1
do something else
end if
values 'examine_door' + 1
It's similar to what riffmaster wrote but it's a little cleaner. Less action parts & it's safer because it's an if or based query.
@esmeralda: the example of riffmaster is correct with the initial condition. If the door is locked then those things are said, but a value would be better now than a condition as you can have the door locked at value 0 & the door open at value 1 rather than needing conditions. The recent implementation that Simon made to the engine to allow values to be used for defining what is active/inactive will save a lot of time in the long run as we no longer need multiple conditions or combi-conditions anymore. I really like that I can use a single value to determine the state of multiple scene objects now.