Upvote Upvoted 0 Downvote Downvoted
Any sort of TF2 screen detection scripts?
posted in Q/A Help
1
#1
0 Frags +

Is there a way for tf2 to detect if you're either on fullscreen or windowed mode and change bind(s) or activate script(s) for that mode accordingly? like if I launched the game on fullscreen mode and I made a script that toggles between those modes, I don't have to double tap on the key I have the script bind to go windowed mode. I don't want to set the launch option of the game to windowed mode either because of preference reasons.

Is there a way for tf2 to detect if you're either on fullscreen or windowed mode and change bind(s) or activate script(s) for that mode accordingly? like if I launched the game on fullscreen mode and I made a script that toggles between those modes, I don't have to double tap on the key I have the script bind to go windowed mode. I don't want to set the launch option of the game to windowed mode either because of preference reasons.
2
#2
3 Frags +

You could create a pseudo toggle using aliases, but scripts basically can't have if statements. They can't read the current state.

bind w toggle
alias toggle "window"
alias window "alias toggle fullscreen; mat_setvideomode 1"
alias fullscreen "alias toggle window; mat_setvideomode 0"

As long as you always launch the game in fullscreen, this bind will toggle between the two.

You could create a pseudo toggle using aliases, but scripts basically can't have if statements. They can't read the current state.

[code]bind w toggle
alias toggle "window"
alias window "alias toggle fullscreen; mat_setvideomode 1"
alias fullscreen "alias toggle window; mat_setvideomode 0"[/code]

As long as you always launch the game in fullscreen, this bind will toggle between the two.
3
#3
0 Frags +

Okay, thank you.

Okay, thank you.
Please sign in through STEAM to post a comment.