need help with a script
Moderator: Forum Moderator
need help with a script
i'm having problems with two scripts (counter-strike config): i want them to be executed at once at a press of a button.
they're both "+COMMAND" type of scripts... one "freezes" the game, and the other one starts a demo. when the button is released, the game "unfreezes" and the demo stops.
they're both "+COMMAND" type of scripts... one "freezes" the game, and the other one starts a demo. when the button is released, the game "unfreezes" and the demo stops.
-
- WC3Mods Donor
- Posts: 223
- Joined: Thu Mar 09, 2006 6:05 pm
- Location: Germany
- Contact:
i have the scripts... i need them to be executed at once when u hold a button
example.rar - demos
example1.rar - freeze
example.rar - demos
example1.rar - freeze
- Attachments
-
- example1.rar
- (258.55 KiB) Downloaded 798 times
-
- example.rar
- (139.21 KiB) Downloaded 851 times
-
- WC3Mods Donor
- Posts: 223
- Joined: Thu Mar 09, 2006 6:05 pm
- Location: Germany
- Contact:
so u got 2 commands to use on one button?
what are the commands?
ok the first is record
but the other one?
u simply have to write an +/- alias and bind it to your key
alias +example "command1;command2"
alias -example "undo_command1;undo_command2"
bind key example
for the demo u have to use record for the + alias and stop for the -alias
the alias +example is triggered when u press a button
and the alias -example is triggered when u release it
just an example
alias +makedemo "record demo.dem"
alias -makedemo "stop"
bind MOUSE3 makedemo
when u press (and hold) MOUSE3 it will start to record a demo and stops it when u release MOUSE3
or just name the commands u want to use or post the scripts u are using atm
what are the commands?
ok the first is record
but the other one?
u simply have to write an +/- alias and bind it to your key
alias +example "command1;command2"
alias -example "undo_command1;undo_command2"
bind key example
for the demo u have to use record for the + alias and stop for the -alias
the alias +example is triggered when u press a button
and the alias -example is triggered when u release it
just an example
alias +makedemo "record demo.dem"
alias -makedemo "stop"
bind MOUSE3 makedemo
when u press (and hold) MOUSE3 it will start to record a demo and stops it when u release MOUSE3
or just name the commands u want to use or post the scripts u are using atm
![Image](http://www.game-monitor.com/server-stat-image/1/FFFFFF/000000/0000FF/000000/88.198.1.171:27015.jpg)
-
- WC3Mods Donor
- Posts: 223
- Joined: Thu Mar 09, 2006 6:05 pm
- Location: Germany
- Contact:
-
- WC3Mods Donor
- Posts: 223
- Joined: Thu Mar 09, 2006 6:05 pm
- Location: Germany
- Contact:
-
- WC3Mods Donor
- Posts: 223
- Joined: Thu Mar 09, 2006 6:05 pm
- Location: Germany
- Contact:
yea that's the way it should work, but it should be like this :
press button - start demo... wait 3 seconds... freeze
release button - unfreeze... wait 3 seconds... stop demo
and it is like this:
press button - freeze, wait 1 sec, start demo
release: stop demo, wait 1 sec, unfreeze
which is not what i have in mind
press button - start demo... wait 3 seconds... freeze
release button - unfreeze... wait 3 seconds... stop demo
and it is like this:
press button - freeze, wait 1 sec, start demo
release: stop demo, wait 1 sec, unfreeze
which is not what i have in mind
-
- WC3Mods Donor
- Posts: 223
- Joined: Thu Mar 09, 2006 6:05 pm
- Location: Germany
- Contact:
![Confused :?](./images/smilies/icon_confused.gif)
should be impossible
if u are running with 100 fps (frames per second) u have to insert 100 waits to get a pause of 1 second
so u need 300 waits for ur command
ok u can build an alias for it
alias wait5 "wait;wait;wait;wait;wait"
alias wait10 "wait5;wait5"
alias wait20 "wait10;wait10"
alias wait100 "wait20;wait20;wait20;wait20;wait20"
alias wait300 "wait100;wait100;wait100"
alias +freezerec "+rec1;wait300;+freeze"
alias -freezerec "-freeze;wait300;-rec1"
bind key +freezerec
this one should work
but u cant move the time while the waits are running
every wait will be 1 frame
if ur playing on 50 frames u need 150 wait to build 3 secs
![Image](http://www.game-monitor.com/server-stat-image/1/FFFFFF/000000/0000FF/000000/88.198.1.171:27015.jpg)