how can i send everyone to their teams intel room on capture?

cal

L1: Registered
Jun 30, 2023
19
1
im trying to make it so that upon intel capture, everyone is sent back to their own capture area on both teams. all ive been able to do so far is make it so that everyone is sent back to their spawn upon intel capture.
 
Solution
You're probably using the ForceRespawn input to game_forcerespawn.
Since you know when this output will happen (on intel capture), you can simply change where the team's spawn is before you send ForceRespawn.
What you would do is send a Disable input to each team's normal spawns, then an Enable input to a new set of spawns (which have the Start Disabled? keyvalue set to "Yes") placed in the intel room, then a ForceRespawn to your game_forcerespawn.
Then, send a Disable input to the intel room spawns with a delay of 5 seconds, and an Enable input to each team's normal spawns with the same delay.

If you didn't follow all that, here's a prefab VMF:

Tiftid

the Embodiment of Scarlet Devil
aa
Sep 10, 2016
613
476
You're probably using the ForceRespawn input to game_forcerespawn.
Since you know when this output will happen (on intel capture), you can simply change where the team's spawn is before you send ForceRespawn.
What you would do is send a Disable input to each team's normal spawns, then an Enable input to a new set of spawns (which have the Start Disabled? keyvalue set to "Yes") placed in the intel room, then a ForceRespawn to your game_forcerespawn.
Then, send a Disable input to the intel room spawns with a delay of 5 seconds, and an Enable input to each team's normal spawns with the same delay.

If you didn't follow all that, here's a prefab VMF:
 

Attachments

  • prefab_ctfforcerespawn.vmf
    81.2 KB · Views: 51
Solution

cal

L1: Registered
Jun 30, 2023
19
1
thank you so much this is exactly what i needed, and it worked perfectly. the prefab was especially useful for helping me wrap my head around it. i appreciate the help