Additive Triggers

- By Stadric
This tutorial was last updated on Jul 28, 2006.

Sometimes you want the player to make something happen(explosions, enemy invasions, etc.) but you want him to do more than just step into a certain room, or push a certain button, sometimes you want the player to hit multiple buttons, or step into multiple triggers, well that's where this tutorial comes in.

I am going to show you how to, in this case, release your rebel friends by doing a panoply of things, all by use of a math_counter.

I made a map for this tutorial, without the part you care about, it's the rudimentary part of the example I will be showing you from here:
http://www.editlife.net/files/maps/example/stadric/countertest1.zip

Everything in the map is set, except the ending sequence, which is triggered by a logic_relay, so all we have to do is activate that, and then the ending sequence will begin.


The example map

Now that we have a basic setup, it's time to make something happen.
See the two hills? Put a func_button on each hill.
Name one button1, and the other button2.
Check the "don't move" flag for each of them
Change Delay before reset: -1

Now make a math_counter, and name it counter
Maximum Legal Value: 2


Now give it this output:


Now give each of the func_button entities this output:


Now compile the map, what happens is that after you've pressed both buttons, the door opens, and the citizens inside walk out.

What happens is that when you press a button, it adds 1 to the math_counter (it starts out at 0). The math_counter's maximum value is two, so when both buttons are pressed, it fires its output, which opens the door and releases the citizens.


Now compile and run the map

*If you learned anything from the above, you don't need to continue*

Now here's another example, within the same map, place a game_text entity, an env_fade entity, and another math_counter entity.

Env_fade:
Name: fade.
Hold Fade(seconds): 10000.

Game_Text:
Name: text.
Message Text: Congratulations.
Hold Time: 10000.

Math_Counter:
Name: counter2.
Maximum Legal Value: 2.

Now give your second math_counter these outputs:


Make two trigger_once entities around the scripted sequence entities already in the map.


Check the "only player ally NPCs" flag, and uncheck all the other flags.

Now give both triggers this output:


(Normally I would use the output "OnEndSequence" from a scripted_sequence, but I've found it doesn't work the way I want it to(IE: at all), so I used the method I used)


Now compile and run the map, and see the effects



For the full version of this example map, download here:
http://www.editlife.net/files/maps/example/stadric/countertest2.zip



Still need help? Ask your questions in one of our HELP FORUMS
Post A Comment
Name:
Email: Links Not Allowed In Comments
Comment:
What is the capital of France? Need Help?
Comments
- - Feb 28, 2010
Images are broken for me.
Slick - Oct 13, 2008
Well... Same with Plate All The Images Are Broken. Can You Fix It?
Plate - Oct 1, 2008
Okay this is a problem... All your pictures are broken for me so can you edit your tutorial so that you type out the input/output. Thanks a bunch if you do that :D
RawMeat3000 - Oct 5, 2007
I've been looking for a tut like this. Thanks.
MBD - Oct 13, 2006
Use trigger_multiple entities to disable its self after adding one to the math_counter. Once the math counter hits its max, have the triggers be enabled and trigger whatever.
biGNUTZ - Oct 13, 2006
or add me to ur msn rj_69a@hotmail.com thx id appreciate it.
[20 extra comments]
All original content ©2006 EditLife.net. All Rights reserved. All files property of their rightful owners.
Get Firefox! Get Thunderbird! Get Notepad++!