News | Forum | People | FAQ | Links | Search | Register | Log in
Mapping Help
This is the place to ask about mapping problems, techniques, and bug fixing, and pretty much anything else you want to do in the level editor.

For questions about coding, check out the Coding Help thread: https://www.celephais.net/board/view_thread.php?id=60097
First | Previous | Next | Last
Spawning Triggers Solves Problems 
Hi RaverX. I'm going to tackle those in reverse order. To "unlock" your door, set it up as a door opened by a trigger_multiple. Then use the approach in https://tomeofpreach.wordpress.com/2012/11/18/mid-map-entity-spawning/ to convert the trigger_multiple into one that spawns mid way through the map. Spawn the trigger when all the zombies are dead.

The issue you're having with trigger_counter is best understood by thinking about co-op. In that arena, trigger_counter messages are not broadcast to all players. Some of the time that's desirable: if the players are off in separate parts of the map, both counting down their own trigger_counter, displaying the other player's progress will just confuse matters. On the occasion where the two players are in the same area you might wish it was otherwise, but the design is locked in.

What that means is that the game needs some way to know which player did a particular thing, so that the counter messages can be delivered to just that player. Your problem is that the zombies aren't being killed by a player at all - because the machine killed the zombies, the message goes to the machine!

If you were really insistent that you must have the messages display, and you don't care about the effect on co-op, you could use the hack from earlier in the post to work around it. Create one spawnable trigger_once the size of your entire map for each zombie. Have each zombie death spawn one of the trigger_once entities, and make them target the trigger_counter. Each time a zombie dies, the trigger_once will be created, and the player will instantly touch it. The action that advanced the counter now comes directly from that player, so the message goes back to them.

It's a lot of trouble and pretty hacky, but it would work. If you did, there's a nice extra little flourish you could add. Give each trigger_once a slightly different delay like 0, 0.05, 0.1 etc, then simultaneous kills would be staggered on the trigger_counter, so you'd see each number pass by. 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2025 John Fitzgibbons. All posts are copyright their respective authors.