Advertisement

Event Triggers

Started by July 16, 2005 01:40 PM
3 comments, last by Wavinator 19 years, 7 months ago
I'm coding a game right now, and I was wondering what your guys take is on triggers. In the game a trigger is essentially a switch that effects part of the level. Do you guys prefer a proximity switch(You get close, it activates) or a proimity action switch(You get close, but then have to press a button). Its probably a little trivial, but I wanted to know before I set anything in stone.
My Current Project Angels 22 (4E5)
It depends entirely what genre this game is, what the switch is supposed to do, how easy it is to move the characters, how many characters I'm controlling, etc., etc., etc.
Advertisement
This is a tough one. Are you talking "events" like a door opening, or "events" like zombies coming through the wall?

If it's doors, then do it on a case-by-case basis. Auto-opening doors make for faster map navigation, but having a door swing wide and expose you to pirate sentries while you're trying to pick up an item next to it can be a real game-wrecker. Pushing buttons is good for positive environment control, but if you miss the button while robots are chasing you, then the designer may as well have fired that laser himself. Second Sight does a good job of using automatic and manual doors where appropriate (although there should be a "go through" command while you're "peeking"), but you need to trust your own judgement there.

For zombies jumping out, I recommend carefully hidden triggers. Doom 3 is a great example of what NOT to do. You could almost see the triggers on the floor and attached to items. "Hmm, a dark side tunnel with a shotgun and some armor in it... Let's find the loose vent and prime a grenade before we go in there." I think the events should be put into motion a while back, and timed so that they might happen when you're nearby. You walk into the room, and the zombies head for the weak wall. If you just stand there and look around, they'll start scratching and moaning over there, and you can investigate or throw a grenade toward the sound or whatever. If you dash through, you'll be past them when they come through, so you can either turn and fight or keep running. If you mosey through at what's probably a reasonable pace, then a zombie arm will come through the wall and choke you. The point is that it's no good to have events happen in a totally deterministic way.
I just added a simple bitflag to toggle this behavior. My triggers are just bounding boxes that can reference world objects to cause reactions or ask for player input. In other words, they are extremely generic, and can be used for infinite numbers of tasks.

I have to put a trigger on either side of a door. Both send a character command to the event character (the one standing in it), like "open door" or "close door". My AI characters use these commands just as much as the player, so I couldn't rely on it being automatic. Even if not, if the player just cruises along and walks through the trigger, I didn't want him to stop and turn and open some door he just happened to walk passed.

On the other hand, the same triggers are used to warp characters to another map when they walk into an exit door hallway. This command is automatic. The player has no choice.
I very much agree with both SiCrane and ICC. It depends on the type of game, but the worst thing to use are regional floor triggers that have players dancing in and out of rooms just to see what they can trip (if nothing else, go with a delayed floor trigger so that I won't just know "Oh, dark room, I guess I'll dash in and dash out")
--------------------Just waiting for the mothership...

This topic is closed to new replies.

Advertisement