Portal - Time slowed down?

Avatar
Stimich
31 Posts
Posted Apr 09, 2009

Is there any chance of getting time slowed down by a trigger or something? or something similar, you walk slow jump slow that stuff? also physics go slow...
thanks!

  • Stimich
Advertisement
Registered users don’t see ads! Register now!
Avatar
PortalFan77
432 Posts
Posted Apr 09, 2009
Replied 5 hours later
You know there is a Portal bullet time mod.
Avatar
Stimich
31 Posts
Posted Apr 09, 2009
Replied 5 minutes later

PortalFan77 wrote:
You know there is a Portal bullet time mod.

may be, but the question was if I could do that by a trigger :razz:

Avatar
mazk1985
135 Posts
Posted Apr 10, 2009
Replied 20 hours later
Funny you should mention this as I just finished a small map based entirely around the concept. It's quite easy to do but you have to enable sv_cheats for it to work. I only say this cos the hud will show that sv_cheats is enabled when it happens. Anyway basically you'll need an entity called point_clientcommand. Give it a name like "consolecommand" or whatever and then have the trigger fire an output to the point_clientcommand with "command" as the input and "sv_cheats 1" in the parameters box. After that you'll need to fire another command with the parameters as "host_timescale *" where * is the time scale you want to use. 1 is normal, 2 is double speed, 0.5 is half speed, etc.

I not sure if you can gradually change it other than firing loads of outputs one after another. For my map I also used an env_fade to maximise the changes effects coupled with a sound and changes to the HDR tone balence. It just emphasises the slowness but I wonder if you could create your own color balence settings to maybe wash out the colours during the slow down. That would be cool. I'm gonna check that out and get back to you actually :biggrin:

Oh yeah sorry that this might be obvious but be aware that the delays on the triggers will change after a host_timescale command according to what scale you use. Sorry I'm going on a bit here but also be aware that sv_cheats will remain on even after you quit the map so the player won't be able to complete challenges unless you fire a command with "sv_cheats 0" as parameters or they manually do it.

Nearly forgot to mention as well that all names above should be without quotes.

Hope that helps dude :smile:

Avatar
HMW
806 Posts
Posted Apr 10, 2009
Replied 2 hours later
I made a Quake 1 (!) map a long time ago where the gravity was lower in some sections. I used triggers and a bit of scripting to change the gravity variable with a console command, but that also caused a message to appear on the HUD. The solution I found was to put a number of blank lines after the change gravity command, so that the offending message would scroll out of view immediately. Perhaps you can do the same here. (Just send your point_clientcommand an event with an empty parameter. (I haven't tested this in Source, so YMMV.))

EDIT: I just realised, 0.23 seconds after pressing "submit", that it says something like "sv_cheats changed to 1", not the actual command. So the above tip likely doesn't work, because you can't give a command that would just output a blank line. Bummer. :redface:

mazk1985 wrote:
[...] I wonder if you could create your own color balence settings to maybe wash out the colours during the slow down. [...]

Yup! Use a color_correction or color_correction_volume entity.
See this article for an explanation.

Avatar
PortalFan77
432 Posts
Posted Apr 10, 2009
Replied 3 hours later
WTF is this shit.
img

Why dont we see this kind of quality in valve maps.

Avatar
Stimich
31 Posts
Posted Apr 10, 2009
Replied 22 minutes later

mazk1985 wrote:
Funny you should mention this as I just finished a small map based entirely around the concept. It's quite easy to do but you have to enable sv_cheats for it to work. I only say this cos the hud will show that sv_cheats is enabled when it happens. Anyway basically you'll need an entity called point_clientcommand. Give it a name like "consolecommand" or whatever and then have the trigger fire an output to the point_clientcommand with "command" as the input and "sv_cheats 1" in the parameters box. After that you'll need to fire another command with the parameters as "host_timescale *" where * is the time scale you want to use. 1 is normal, 2 is double speed, 0.5 is half speed, etc.

I not sure if you can gradually change it other than firing loads of outputs one after another. For my map I also used an env_fade to maximise the changes effects coupled with a sound and changes to the HDR tone balence. It just emphasises the slowness but I wonder if you could create your own color balence settings to maybe wash out the colours during the slow down. That would be cool. I'm gonna check that out and get back to you actually :biggrin:

Oh yeah sorry that this might be obvious but be aware that the delays on the triggers will change after a host_timescale command according to what scale you use. Sorry I'm going on a bit here but also be aware that sv_cheats will remain on even after you quit the map so the player won't be able to complete challenges unless you fire a command with "sv_cheats 0" as parameters or they manually do it.

Nearly forgot to mention as well that all names above should be without quotes.

Hope that helps dude :smile:

LOL thanks :biggrin: it worked perfectly! :biggrin: thank you :smile:

Avatar
mazk1985
135 Posts
Posted Apr 10, 2009
Replied 30 minutes later

HMW wrote:
Yup! Use a color_correction or color_correction_volume entity.
See this article for an explanation.

Thanks dude. Had a quick look and I didnt know there was a UI for color correction. I thought I had to get down and dirty with color codes or something. UI's ftw :smile:

Avatar
Stimich
31 Posts
Posted Apr 10, 2009
Replied 9 minutes later

mazk1985 wrote:
Thanks dude. Had a quick look and I didnt know there was a UI for color correction. I thought I had to get down and dirty with color codes or something. UI's ftw :smile:

http://www.youtube.com/watch?v=P3UKXZBZldQ here is the results! I found a way to not make a new trigger to make it real time!

Avatar
reepblue
894 Posts
Posted Apr 11, 2009
Replied 4 hours later
If you find a way to hide the "server sv_cheats set to 1" message, It would be perfect.

Nice work tho, Very nice.

Avatar
PortalFan77
432 Posts
Posted Apr 11, 2009
Replied 12 hours later
But that is just bullet time mod and that has been out for over a year.
Avatar
Solomon
23 Posts
Posted Apr 11, 2009
Replied 2 minutes later
Nice. But if you use this in a map, the person playing it would not know that time was about to slow and would wonder what was happening. Maybe you could make it so that you have an effect before and after time slows? Or some kind of warning, maybe in text?
Avatar
dvlstx
183 Posts
Posted Apr 12, 2009
Replied 9 hours later

reepblue wrote:
If you find a way to hide the "server sv_cheats set to 1" message, It would be perfect.

Nice work tho, Very nice.

cl_drawhud 0... I think?
I've got this going in my map pack too, to emphasize an important (and rather fast) part of it. I think that drawhud hides the little sv_cheats message...

Avatar
mazk1985
135 Posts
Posted Apr 12, 2009
Replied 14 hours later
The drawhud command would remove the crosshair tho so it's not ideal
Avatar
HMW
806 Posts
Posted Apr 12, 2009
Replied 1 hour later
This looks very interesting. A great application would be for making tricky flings a bit easier to do. You would indeed need to add some additional clues to the map, like marking off the slow-area in a distinctive way and using display / sound effects.

I'm going to experiment with this a bit and see if I can get rid of that sv_cheats message. I'll post here if I find anything.

@PortalFan77:
I've searched for a Portal bullet time mod, but the ones I could find are all controlled by the player, with a special key. Stimich wants to control bullet-time as part of the map, not having the player turn it on and off at will. Is there anything like that already in existence? (Preferrably one that doesn't spam the HUD with server messages.)

Avatar
PortalFan77
432 Posts
Posted Apr 12, 2009
Replied 1 hour later
Ive seen one used in a map that changed the Gravity and physics of the game, I forgot the map name but Ill try and find it again.

In one of the timed chambers there was a button that slowed down the entire game without sv_cheats popping up.

Avatar
Stimich
31 Posts
Posted Apr 13, 2009
Replied 22 hours later

HMW wrote:
This looks very interesting. A great application would be for making tricky flings a bit easier to do. You would indeed need to add some additional clues to the map, like marking off the slow-area in a distinctive way and using display / sound effects.

I'm going to experiment with this a bit and see if I can get rid of that sv_cheats message. I'll post here if I find anything.

@PortalFan77:
I've searched for a Portal bullet time mod, but the ones I could find are all controlled by the player, with a special key. Stimich wants to control bullet-time as part of the map, not having the player turn it on and off at will. Is there anything like that already in existence? (Preferrably one that doesn't spam the HUD with server messages.)

hmm... yeah, but Idk how to change the sound or anything except Audacity... but tha'ts cheap imo... :razz: it would be nice if you enter the trigger, then Glados talks, of course in fastforward since you're in slow-motion, then when you go out of the trigger Glados talks normally! but idk how..

Avatar
Solomon
23 Posts
Posted Apr 13, 2009
Replied 50 minutes later
Can a trigger control the pitch of a sound? Because, while mapping, I added some music and by changing the pitch (In hammer) it changed the speed too.
Avatar
Stimich
31 Posts
Posted Apr 13, 2009
Replied 44 minutes later

Solomon wrote:
Can a trigger control the pitch of a sound? Because, while mapping, I added some music and by changing the pitch (In hammer) it changed the speed too.

Speed? like slow-mo, or fastforward?... that kinda speed? O.o

Advertisement
Registered users don’t see ads! Register now!
Avatar
HMW
806 Posts
Posted Apr 13, 2009
Replied 10 minutes later
Hey guys, I know how to get rid of the sv_cheats message!
- At the start of your map, place a trigger_once. (Or re-use one you already have.)- Add an OnTrigger output with your point_clientcommand as the target.- Set the input to "Command" and the parameter to "hud_saytext_time 0". (No quotes.)The hud_saytext_time variable determines for how long the orange server messages stay on the screen, in seconds. (The default is 12.) So setting it to 0 causes the sv_cheats message to be visible for 0 seconds. :biggrin:

@Solomon:
The "Pitch" setting of sound-emitting entities actually changes the playback speed. Because of the way sound works, playing a sound file faster also raises its pitch. (Exactly like fast-forwarding a cassette tape.) This doesn't matter with normal sound effects in the game; often it's even desirable. (E.g. in case of an engine revving up.)
To change the pitch of music while keeping the speed constant, you need to re-sample it using an audio editing application like Audacity, save it as a new .wav or .mp3 file and use that in your map.
If you want to change one of Valve's stock soundtracks, you need to extract it from the game cache files using GcfScape and distribute the modified version with your map. (And risk getting sued for copyright infringement...:neutral:)