View previous topic :: View next topic |
Author |
Message |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Wed May 09, 2007 8:11 pm Post subject: Set Command with DarkPlaces |
|
|
I made a superzoom alias in DarkPlaces that restores the FOV and sensitivity to whatever value was being used prior to using it.
You just do the old ...
bind mouse3 +superzoom
... and it works fine.
Quote: | alias +superzoom "set scratch1 $fov; set scratch2 $sensitivity; fov 70; sensitivity 4; wait; fov 58; sensitivity 3.25; wait; fov 45; sensitivity 2.50; wait; fov 32; sensitivity 1.74; wait; fov 20; sensitivity 14.0"
alias -superzoom "fov 32; sensitivity 1.75; wait; fov 45; sensitivity 2.50; wait; fov 58; sensitivity 3.25; wait; sensitivity 4; wait; set sensitivity $scratch2; set fov $scratch1" |
However, I get an onscreen messages saying this:
Quote: | 7Warning: could not find cvar fov; when expanding alias +superzoom
set scratch1 $fov; set scratch2 $sensitivity; fov 70; sensitivity 4; wait;
fov 58; sensitivity 3.25; wait; fov 45; sensitivity 2.50; wait; fov 32;
sensitivity 1.74; wait; fov 20; sensitivity 14.0
Warning: could not find cvar sensitivity; when expanding alias +superzoom
set scratch1 $fov; set scratch2 $sensitivity; fov 70; sensitivity 4; wait;
fov 58; sensitivity 3.25; wait; fov 45; sensitivity 2.50; wait; fov 32;
sensitivity 1.74; wait; fov 20; sensitivity 14.0
Warning: could not find cvar scratch2; when expanding alias -superzoom
fov 32; sensitivity 1.75; wait; fov 45; sensitivity 2.50; wait; fov 58;
sensitivity 3.25; wait; sensitivity 4; wait; set sensitivity $scratch2; set fov
$scratch1
Warning: could not find cvar scratch2; when expanding alias -superzoom
fov 32; sensitivity 1.75; wait; fov 45; sensitivity 2.50; wait; fov 58;
sensitivity 3.25; wait; sensitivity 4; wait; set sensitivity $scratch2; set fov
$scratch1 |
Any ideas on why the script would work fine, but I get these warning messages? |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Mon May 14, 2007 7:55 pm Post subject: |
|
|
After doing everything to try to figure this out myself, I ended up asking LordHavoc and the answer was that a space needs to follow the cvars in the SET statements otherwise it thinks I'm trying to use "fov;" as a cvar.
The following works fine:
Quote: | alias +superzoom "set fov- $fov ; set sensitivity- $sensitivity ; fov 70; sensitivity 4; wait; fov 58; sensitivity 3.25; wait; fov 45; sensitivity 2.50; wait; fov 32; sensitivity 1.74; wait; fov 20; sensitivity 14.0"
alias -superzoom "fov 32; sensitivity 1.75; wait; fov 45; sensitivity 2.50; wait; fov 58; sensitivity 3.25; wait; sensitivity 4; wait; set sensitivity $sensitivity- ; set fov $fov-"
|
|
|
Back to top |
|
 |
Gilgamesh
Joined: 26 Oct 2004 Posts: 67 Location: Brazil
|
Posted: Tue May 15, 2007 5:12 pm Post subject: |
|
|
Thanks for the info!  _________________ #EOP |
|
Back to top |
|
 |
|