View Single Post
Author Message
Proaxel
Member
Join Date: Oct 2014
Old 03-31-2021 , 17:02   [L4D2] How to force proceed + How to tell if Survivor is in safe room / group area?
Reply With Quote #1

I would like to try making a few of these plugins myself, but I lack the knowledge of certain things. Here are the details:

Anti-Molotov Griefing: If a survivor tries to throw a molotov, check if they are in a safe room, grouping area, or escape vehicle. If they are in any of those, block the molotov throw (by returning Plugin_Handled in the weapon_fire event?), and show a message saying throwing molotovs in this area is prohibited.

Anti-Stall: In grouping areas where all players need to group together and then push a button in order to proceed, like the elevators in Dead Center, No Mercy or Hard Rain. If enough different players push the button (maybe 75% of alive survivors), start a 60 second countdown. When the timer expires, teleport any survivors not in the area to a survivor that is in the area (or the location saved at the moment the first person that pushed the button if there is none), and force the button to activate.

Similarly in escape vehicles: Start a 60 second countdown when 75% of alive survivors enter an escape vehicle. When the timer expires, run ForcePlayerSuicide on any survivors not in the rescue zone and force the vehicle to leave. Kill the timer if the amount of alive survivors in the vehicle falls below a certain amount (50%?).

(Grouping area = any area where if you try to proceed while not all survivors are in the area, the game will tell you to "Wait for everyone to be ready first")
  • How do you determine via SourceMod if a survivor is currently in a safe room, rescue vehicle, or a grouping area?
  • In Sourcemod, how do you forcibly trigger something that allows the survivors to proceed, like the pushing the button in the elevator, or interacting with something required to trigger a finale (like the No Mercy radio)?
  • How do you forcibly make an active rescue vehicle depart (and thus trigger the end of the campaign)?
Proaxel is offline