PDA

View Full Version : Tutorials for common mapping problems/questions



Nih
07-09-2009, 09:32 AM
How do I...


Make it so 2 players have to use two buttons at the same time to trigger something?

You start by creating 2 func_buttons as you normally would. Make each of them target a multisource entity, and then set the target of the multisource to whatever you want triggered.
You can adjust the time the players have to press the buttons by adjusting the func_buttons "delay before reset". The longer this is, the more time the players have to press the second button after pressing the first one.

Make it so something is triggered after a certain amount of monsters die?

Start out by creating 1 or several squadmaker entities. Configure them however you like.
Afterwards, create a game_counter entity. Set the limit to the amount of monsters you want killed. Then make it target whatever you want triggered.
Then, set the trigger_condition of your squadmaker(s) to "On death", and trigger_target to the name of the game_counter.

Lock or unlock doors/buttons/anything else?

Let's say you're making a map where you want to lock a button until the players have turned on a generator.

Start out by creating 2 func_buttons, the one that turns on the generator and the one you want locked/unlocked.
Set "buttonlock" as the Master for the button you want locked. The button will be locked from the start.
Then, create a multisource called buttonlock.
Have the "generator button" target the multisource. Once players use the generator button, the locked button will become unlocked. Use it again, and it will be locked. Once more, and it will be unlocked, and so on.

Alternatively, you can use a trigger_changetarget to make the button target something that doesn't exist, and another trigger_changetarget to make the button target its real target. Using the Master system is easier, but doing it this way can be useful sometimes.

Change the players spawn points to somewhere else?

Give the initial spawn points the name "spawn1".
Place the spawn points you want to switch to later, and give them the name "spawn2" and the flag "Start disabled."
Use a multimanager or 2 trigger_relays to trigger "spawn1" and "spawn2" at the same time, and the players will spawn at the new spawn points from then on.

You might want the players to respawn immediately. In that case, trigger a trigger_respawn after the spawn points have been switched.

NinjaBlack1337
15-05-2016, 04:58 PM
My questions.

Can use key (aka item_inventory) to allow open door without button

Kirito
11-02-2017, 05:30 PM
Thanks! You should sticky this, still helpful.

dan_g
23-09-2018, 05:52 AM
sorry to bump this old thread.

im having problems setting up a spawn change.

here is my setup

multi_manager:
targetname: start (gets triggered by a button atm)

startspawn2 after 1 sec. (the new spawnpoint)
startspawn1 after 2 sec. (this should disable this startspawn1)
spawnswitch after 3 sec. (this triggers a "trigger_respawn with target "startspawn2")


so the trigger respawn works and i get spawned on the 2. but after i kill myself there are no spawnpoints available. i'v read that i need to do the switch of the spawns in a row and not the same time to make it work.
http://zyl.pestermom.com/external/entguide/entities/info_player_deathmatch.html both methods (same time and delayed) don't work for me.

i can provide my test map if needed

thanks in advance

Greetings
Dan_g

_RC
23-09-2018, 06:39 AM
spawnswitch after 3 sec. (this triggers a "trigger_respawn with target "startspawn2")


trigger_respawn does not need a target to respawn all players.
what it does with your setup is triggering "startspawn2" when respawning the player -> it gets turned off.

dan_g
23-09-2018, 07:33 AM
omg my bad XD

now it works as a charm! thanks

Danke dir! ;)


Dan_g