[SOLVED] Thrust fling sfx on launch
Quote from Konke on May 25, 2014, 11:08 amI have a portable surface that the player falls through and then flings out from another surface, a momentum puzzle so to speak. I'd like a thrust fling sound effect to start when the player flies out of the second surface.
The problem is that I don't think that a trigger_multiple is the best solution because the portable surface is accessable at any time. Is it possible to use another sort of solution where the sound playes when the player gets through the first portal and out of the second, some kind of true/false solution? Thanks in advcance!
I have a portable surface that the player falls through and then flings out from another surface, a momentum puzzle so to speak. I'd like a thrust fling sound effect to start when the player flies out of the second surface.
The problem is that I don't think that a trigger_multiple is the best solution because the portable surface is accessable at any time. Is it possible to use another sort of solution where the sound playes when the player gets through the first portal and out of the second, some kind of true/false solution? Thanks in advcance!
Quote from srs bsnss on May 25, 2014, 12:00 pmA trigger_catapult will work here. I'm pretty sure you can set it so that it doesn't adjust the velocity too much, but the main thing is that it will only give an output when you're at a certain speed (OnCatapulted output).
Alternatively, you can use a func_portal_detector + the OnPortalPlaced output + a math_counter or coop_manager to detect when players have their portals in certain places. I use this method a lot to check if players have solved puzzles and therefore should trigger outro scenes.
EDIT: See Felix's post.
A trigger_catapult will work here. I'm pretty sure you can set it so that it doesn't adjust the velocity too much, but the main thing is that it will only give an output when you're at a certain speed (OnCatapulted output).
Alternatively, you can use a func_portal_detector + the OnPortalPlaced output + a math_counter or coop_manager to detect when players have their portals in certain places. I use this method a lot to check if players have solved puzzles and therefore should trigger outro scenes.
EDIT: See Felix's post.
Quote from FelixGriffin on May 25, 2014, 1:34 pmUse a trigger_catapult with the "Only Check Velocity" flag. This just tells you whether something came through in the right direction with sufficient speed or not (it's used in the Wheatley monitor instance to detect flying physics objects).
Use a trigger_catapult with the "Only Check Velocity" flag. This just tells you whether something came through in the right direction with sufficient speed or not (it's used in the Wheatley monitor instance to detect flying physics objects).
Quote from Konke on June 16, 2014, 11:18 amFelixGriffin wrote:Use a trigger_catapult with the "Only Check Velocity" flag. This just tells you whether something came through in the right direction with sufficient speed or not (it's used in the Wheatley monitor instance to detect flying physics objects).Thanks! I've been trying to get the trigger_catapult to work. I've checked the "Only Check Velocity" flag and the "Use Threshold Check" flag (since the first flag tells me to) but it doesn't work. Are there any other parameters I should check with? How does the trigger know when to trigger outputs?
Thanks! I've been trying to get the trigger_catapult to work. I've checked the "Only Check Velocity" flag and the "Use Threshold Check" flag (since the first flag tells me to) but it doesn't work. Are there any other parameters I should check with? How does the trigger know when to trigger outputs?
Quote from FelixGriffin on June 16, 2014, 10:49 pmA trigger_catapult works something like this:
- When something enters the trigger, it does the standard filter checks.
- If those checks are passed, it looks at the object's velocity and direction and compares them to the threshold check.
- If that passes, it fires the OnCatapulted output.
- After firing the output, if the "Only Check Velocity" flag is NOT enabled, it sets the object's velocity to its fling parameters.A faith plate has no threshold check, a "fling helper" does, and a velocity sensor has Only Check Velocity as well.
A trigger_catapult works something like this:
- When something enters the trigger, it does the standard filter checks.
- If those checks are passed, it looks at the object's velocity and direction and compares them to the threshold check.
- If that passes, it fires the OnCatapulted output.
- After firing the output, if the "Only Check Velocity" flag is NOT enabled, it sets the object's velocity to its fling parameters.
A faith plate has no threshold check, a "fling helper" does, and a velocity sensor has Only Check Velocity as well.
Quote from Konke on June 17, 2014, 8:17 amI've tried to see how Valve use them with the Weatley monitor (map: sp_a4_stop_the_box) but I don't get it. They don't even use Only Check Velocity on their catapult trigger. But at the same time, the trigger actually catapults the player...
But I wonder, which parameter checks for the players speed?
Is this correct? I created a brush at the exiting portal area, with the trigger texture, set it to a trigger_catapult, changed "Only Check Velocity" to "Yes", "Use Threshold Check" to "Yes" and "Entry Angle Tolerance" to "-1".
On the Outputs I use the following:
OnCatapulted | catapult_sfx | PlaySound
I've tried to see how Valve use them with the Weatley monitor (map: sp_a4_stop_the_box) but I don't get it. They don't even use Only Check Velocity on their catapult trigger. But at the same time, the trigger actually catapults the player...
But I wonder, which parameter checks for the players speed?
Is this correct? I created a brush at the exiting portal area, with the trigger texture, set it to a trigger_catapult, changed "Only Check Velocity" to "Yes", "Use Threshold Check" to "Yes" and "Entry Angle Tolerance" to "-1".
On the Outputs I use the following:
OnCatapulted | catapult_sfx | PlaySound
Quote from FelixGriffin on June 17, 2014, 9:12 amThat looks right.
Use Player Speed of whatever you want, Lower Threshold of 0, and Upper Threshold of 1.
That looks right.
Use Player Speed of whatever you want, Lower Threshold of 0, and Upper Threshold of 1.
Quote from Konke on June 18, 2014, 11:12 amI've been trying to set up the thresholds aswell but none of it works. Would you, or anyone else, be so kind and send a custom map file with the correct settings so I can see and compare, please?
I've been trying to set up the thresholds aswell but none of it works. Would you, or anyone else, be so kind and send a custom map file with the correct settings so I can see and compare, please?
Quote from Konke on June 20, 2014, 7:41 amHad to set the correct angle direction of the trigger_catapult. It works now. Thanks a lot guys!
Had to set the correct angle direction of the trigger_catapult. It works now. Thanks a lot guys!