Please or Register to create posts and topics.

Time control mechanic (Help!)

Page 1 of 4Next

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.

You could try setting the volume to zero, and then setting the volume back afterwards.

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!
CamBen 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.

Wow! That was...uh, yeah. Just, yeah.
protoborg 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.

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. :)

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.

Falsi sumus crusto!
Lpfreaky90 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'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 think phys_timescale still works, though, it's aprt of the HL2 base.

Falsi sumus crusto!
Lpfreaky90 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 2 :(

Oh 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.

Page 1 of 4Next