One of the reasons why I remade Q3 Pro-Tourney4, was I wanted to make the quake-ish doors in UT. Somehow I just felt it was very interesting. I made it before for Rocketeer when we were still enjoying UT2003. But that one was not exactly like a standard quake-ish door. But now we have the useful Kismet, so I thought it shouldn't be too difficult. But I was wrong. It turned out to be pretty tricky, as there were always bugs. Like the doors got stucked sometimes or it simply didn't open. And meanwhile someone commented on my post said it was not possible to make it, as the triggering in UT3 was buggy. He also quoted what Hourences said in this tutorial.
But I didn't give up though I almost did. Eventually after many tests and modifications of the scripts, it seemed work. No more reproducible bugs and the door behaviour looked really like what we saw in quake (at least in q3, I am not quite sure about the others).
So I'd like to show you how I made the doors, in case you may like to do it.
What does a quake-ish door look like?
- Opens up automatically when at least a pawn is getting close
- Opens up when hit by bullets or let's say gets "damaged"
- Stays open if at least a pawn stays around it
- Closes automatically in a few seconds when no pawn is there
So, basically the flow is like:
It's just very rough. And lack of details on things like triggering the sound or adding protection to avoid possible bugs.
A couple of things you shall note:
- Only the first Pawn can trigger the door before the door is closed again. So we need a counter.
- Don't call the movement of the door (the matinee) when it is already active (moving), which is important to avoid potential matinee interruption (I am not sure if EPIC had done anything in the code to protect the movement based on the matinee. Since it's latent, I would rather to avoid any interruption in the kismet script). It turned out to be useful and saved my ass. And that kind of interruption is probably why some guys failed to make it or felt it was a triggering problem.
- Most shooting cause damage to the target, but things like bio goo or flak shard, they don't give damage right away when they hit target. So we need a collision object to detect these projectiles
Let's start off in the editor
1) Make sure you have finished setting up your animated door, which means the interp actor and the animation in the matinee. If you have no idea how to make it, you have to check other tutorials as I am not going to cover the details here.
2) To detect a pawn or a projectile, you can use a trigger, or a triggervolume, or even a mesh (as an interp actor) with collision. Triggers use cylindric collsion which is good enough to detect a pawn coming to the door. But we need a custom collision with more precise shape to detect the projectile, and it just wrap around the door, so that it only get triggered by a projectile "hits" right on the door.
A trigger placed at the doorway, and a triggervolume wrapping around the door
You may want to modify the collision size of the trigger. Go to "Collision-->CollisionComponent" in the properties window of the trigger, and change "CollisionHeight", and "CollisionRadius"
3) Select the trigger and add it to the kismet
Select the touch event in the kismet,
Add "Pawn" in the proximity type list. This class include player and NPC
Also add the triggervolume to the kismet,
The flak cannon stuff is not exactly like the other projectile, so you have to list all of them
3) Select the door, and in the kismet, add an event like this:
Set its properties:
Give a small number to the "DamageThreshold", so it's always triggered by any damage.