Author Topic: GMod Slo-Mo Script (One More Thing, Sorry)  (Read 9013 times)

I downloaded the Dear Sister weapon, which, when you shoot, it changes the timescale for slomo, then drops the weapon. Just like the skit.

Anyway, I was wondering, "What if I made a code that could change the timescale at my command?" So, I attempted it, looking at the other Dear Sister code. Because I'm a worthless scripter, it didn't work. I was wondering if anyone could take a look at it and see what was wrong. Here's the code:
Code: [Select]
//Slo-Mo Toggle
unbind mouse3
bind mouse3 "+slomo"
alias "+slomo" (game.Consolecommand "host_timescale 0.5")
alias "-slomo" (game.Consolecommand "host_timescale 1")
Additionally, is there a way to make the Dear Sister weapon not drop itself after I fire? Thanks for help with either!
« Last Edit: June 29, 2010, 07:50:54 PM by Dapizzanator »

I like changing physics timescale to 0.15 and then "bind h kill" into the console

then jumping off buildings and pressing H all the time

Can you bind a key to timescale change? like bind "o" "timescale 0.01"?

You need sv_cheats at 1.

I downloaded the Dear Sister weapon, which, when you shoot, it changes the timescale for slomo, then drops the weapon. Just like the skit.

Anyway, I was wondering, "What if I made a code that could change the timescale at my command?" So, I attempted it, looking at the other Dear Sister code. Because I'm a worthless scripter, it didn't work. I was wondering if anyone could take a look at it and see what was wrong. Here's the code:
Code: [Select]
//Slo-Mo Toggle
unbind mouse3
bind mouse3 "+slomo"
alias "+slomo" (game.Consolecommand "host_timescale 0.5")
alias "-slomo" (game.Consolecommand "host_timescale 1")
Additionally, is there a way to make the Dear Sister weapon not drop itself after I fire? Thanks for help with either!
This idea has been done before many times.

This idea has been done before many times.
Personal script, dude.
@Marcem: I'm pretty sure cheats were on. Are there supposed to be quotation marks, or a lack of them, etc. in the script? Like coding "grammar" errors, almost?

Personal script, dude.
@Marcem: I'm pretty sure cheats were on. Are there supposed to be quotation marks, or a lack of them, etc. in the script? Like coding "grammar" errors, almost?
Having cheats on in a public server = bad

It's for my server. For God's sake, people, I just asked for help on this script, not what I'm going to do with it.

You can just change "host_timescale"

sv_cheats 1
bind mouse3 +slomo
alias +slomo "host_timescale 0.1"
alias -slomo "host_timescale 1"


garrysmod > garrysmod > cfg > make a .txt named autoexec then put the code inside it. Then rename autoexec.txt to autoexec.cfg

sv_cheats 1
bind mouse3 +slomo
alias +slomo "host_timescale 0.1"
alias -slomo "host_timescale 1"


garrysmod > garrysmod > cfg > make a .txt named autoexec then put the code inside it. Then rename autoexec.txt to autoexec.cfg
Thanks, Devvy. That's good for future reference. Locking topic.
Crap. One thing, how do you make it toggle on and off? Thanks, sorry.
« Last Edit: June 29, 2010, 07:45:19 PM by Dapizzanator »

Thanks, Devvy. That's good for future reference. Locking topic.
Crap. One thing, how do you make it toggle on and off? Thanks, sorry.
-slomo?

Will that toggle it? That's what's in the script right now, but I have to hold the button down for slomo, and when I release it, it goes normal. I want it to toggle on and off, like it does with noclip. You don't have to hold V forever to stay in noclip mode.

Will that toggle it? That's what's in the script right now, but I have to hold the button down for slomo, and when I release it, it goes normal. I want it to toggle on and off, like it does with noclip. You don't have to hold V forever to stay in noclip mode.
Dunno then.

Alright. Just did a quick search, but the only thing I could find regarding "toggle" in Lua, is any piece of code that already requires ____ 0 or ____ 1. I need it for this command, but it's a command that isn't already a toggle. Devvy, anything on this?