Time control mechanic (Help!)
Quote from StimichPortals on February 23, 2013, 2:38 pmHello!
I'm working on a time control mechanic which allows the player to pause or slow down time to complete puzzles. However, I do have two problems - one worse than the other:1.(The worst, I guess) If I have a radio playing some music in a pause control map and then pause time, is there a way to pause the sound playing? Like when you hit ESC. I know you can use StopSound, but when time restarts you'd think that the sound would play from where it got paused, but this is not the case if I use PlaySound when it restarts.
2. This isn't that much of a problem, but more nit-picking on my part. When you slow down time you slow down everything, but I've put a player_speedmod to speed up the player, it doesn't feel quite the same as normal speed. Maybe there is a way to fix that, I'm not sure.
I've recorded a video that shows this (Though the sound didn't want to stop for some reason, but you get the point. It did restart however.):
http://www.youtube.com/watch?v=gP7GRcatK2g&feature=youtu.be
Also, people have been complaining that the water doesn't stop animating when time is paused. Is there a way to fix that? Like, make a non-animated water texture? I'm not sure how to do that myself, but maybe some of you guys could help.
Hello!
I'm working on a time control mechanic which allows the player to pause or slow down time to complete puzzles. However, I do have two problems - one worse than the other:
1.(The worst, I guess) If I have a radio playing some music in a pause control map and then pause time, is there a way to pause the sound playing? Like when you hit ESC. I know you can use StopSound, but when time restarts you'd think that the sound would play from where it got paused, but this is not the case if I use PlaySound when it restarts.
2. This isn't that much of a problem, but more nit-picking on my part. When you slow down time you slow down everything, but I've put a player_speedmod to speed up the player, it doesn't feel quite the same as normal speed. Maybe there is a way to fix that, I'm not sure.
I've recorded a video that shows this (Though the sound didn't want to stop for some reason, but you get the point. It did restart however.):
http://www.youtube.com/watch?v=gP7GRcatK2g&feature=youtu.be
Also, people have been complaining that the water doesn't stop animating when time is paused. Is there a way to fix that? Like, make a non-animated water texture? I'm not sure how to do that myself, but maybe some of you guys could help.
Quote from CamBen on February 23, 2013, 3:03 pmYou could try setting the volume to zero, and then setting the volume back afterwards.
You could try setting the volume to zero, and then setting the volume back afterwards.
Aperture Science: We do our science asbestos we can!
Quote from protoborg on February 23, 2013, 3:14 pmCamBen wrote:You could try setting the volume to zero, and then setting the volume back afterwards.That wouldn't pause the sound. It would only mute it.
StimichPortals wrote:Hello!
I'm working on a time control mechanic which allows the player to pause or slow down time to complete puzzles. However, I do have two problems - one worse than the other:1.(The worst, I guess) If I have a radio playing some music in a pause control map and then pause time, is there a way to pause the sound playing? Like when you hit ESC. I know you can use StopSound, but when time restarts you'd think that the sound would play from where it got paused, but this is not the case if I use PlaySound when it restarts.
I think you can use PauseSound, but don't quote me on that.
StimichPortals wrote:2. This isn't that much of a problem, but more nit-picking on my part. When you slow down time you slow down everything, but I've put a player_speedmod to speed up the player, it doesn't feel quite the same as normal speed. Maybe there is a way to fix that, I'm not sure.I think there is a way to determine the player's exact speed. If not, you could always set a switch to not effect the player.
That wouldn't pause the sound. It would only mute it.
I'm working on a time control mechanic which allows the player to pause or slow down time to complete puzzles. However, I do have two problems - one worse than the other:
1.(The worst, I guess) If I have a radio playing some music in a pause control map and then pause time, is there a way to pause the sound playing? Like when you hit ESC. I know you can use StopSound, but when time restarts you'd think that the sound would play from where it got paused, but this is not the case if I use PlaySound when it restarts.
I think you can use PauseSound, but don't quote me on that.
I think there is a way to determine the player's exact speed. If not, you could always set a switch to not effect the player.
Quote from StimichPortals on February 23, 2013, 3:34 pmprotoborg wrote:I think you can use PauseSound, but don't quote me on that.This does not work.
protoborg wrote:I think there is a way to determine the player's exact speed. If not, you could always set a switch to not effect the player.Then I guess the slowmo sound effect wouldn't work.
This does not work.
Then I guess the slowmo sound effect wouldn't work.
Quote from Lpfreaky90 on February 23, 2013, 3:56 pmit is possible. to adjust the speed except for the player. I've seen it before somewhere. I will see if I can see how it's done.
it is possible. to adjust the speed except for the player. I've seen it before somewhere. I will see if I can see how it's done.
Quote from FelixGriffin on February 23, 2013, 4:05 pmThere's a server convar (also a cheat) called phys_timescale or some such that only slows it down for the physics engine. I don't think it changes sound, but it might. It doesn't blend nicely like the logic_timescale entity does, though.
There's a server convar (also a cheat) called phys_timescale or some such that only slows it down for the physics engine. I don't think it changes sound, but it might. It doesn't blend nicely like the logic_timescale entity does, though.
Quote from StimichPortals on February 23, 2013, 4:12 pmLpfreaky90 wrote:it is possible. to adjust the speed except for the player. I've seen it before somewhere. I will see if I can see how it's done.I see. Would be nice if you would reveal the secrets if you find out! Thanks.

I see. Would be nice if you would reveal the secrets if you find out! Thanks.
Quote from Lpfreaky90 on February 25, 2013, 7:20 pmI'm sorry, it is apparently a specific for the educational version of portal 2.
It's hard coded, the engine is somewhat different to the normal portal 2. The speed things there are not available in our portal 2
I'm sorry, it is apparently a specific for the educational version of portal 2.
It's hard coded, the engine is somewhat different to the normal portal 2. The speed things there are not available in our portal 2
Quote from FelixGriffin on February 25, 2013, 9:49 pmI think phys_timescale still works, though, it's aprt of the HL2 base.
I think phys_timescale still works, though, it's aprt of the HL2 base.
Quote from StimichPortals on February 25, 2013, 11:42 pmLpfreaky90 wrote:I'm sorry, it is apparently a specific for the educational version of portal 2.
It's hard coded, the engine is somewhat different to the normal portal 2. The speed things there are not available in our portal 2Oh damn. Oh well, guess I'll just work with what I have. Thanks anyways!
FelixGriffin wrote:I think phys_timescale still works, though, it's aprt of the HL2 base.It does work. You don't need sv_cheats to change it either.
It's hard coded, the engine is somewhat different to the normal portal 2. The speed things there are not available in our portal 2

Oh damn. Oh well, guess I'll just work with what I have. Thanks anyways!
It does work. You don't need sv_cheats to change it either.