Fortress Forever

Go Back   Fortress Forever > Help & Technical > FF Technical Support

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 10-15-2014, 08:30 PM   #1
Join Date: Oct 2014
Gametype: Capture the Flag
Posts Rated Helpful 0 Times
Fortress Forever Scripting Question

OK, so I'm a bit stumped. I've come up with the following bit of code which allows me to hit the Alt key and change to a different set of key bindings then hit the Alt key again to change it back. Here is the code I'm using for my engineer:

alias Switch+ "bind F5 aimsentry; bind 1 detdismantlesentry; bind 2 dismantledispenser; bind 3 detdispenser; wait; alias Switch Switch-"
alias switch- "bind F5 slot1; bind 1 slot2; bind 2 slot3; bind 3 slot4; wait; alias Switch switch+"
alias Switch "Switch+"

bind "ALT" "Switch"

This code works flawlessly for my engineer. However, when I use the same kind of code for my spy it completely malfunctions. Here's the code for the spy:

alias Switch+ "bind F5 E-demoman; bind 1 E-engineer; bind 2 E-hwguy; bind 3 E-medic; wait; bind 4 E-pyro; bind 5 E-scout; bind TAB E-sniper; bind ENTER E-soldier; wait; bind BACKSPACE E-spy; bind UPARROW F-demoman; bind HOME F-engineer; bind PGUP F-hwguy; wait; bind W F-medic; bind LEFTARROW F-pyro; bind [ F-scout; bind ] F-sniper; bind RIGHTARROW F-soldier; wait; wait; wait; wait; wait; wait; alias Switch Switch- wait; wait; wait; wait; wait; wait"
alias switch- "wait; wait; wait; wait; wait; wait; bind F5 slot1; bind 1 slot2; bind 2 slot3; bind 3 slot4; wait; bind 4 slot5; bind 5 impulse 100; bind TAB Scoreboard; bind ENTER +attack2; wait; unbind BACKSPACE; bind UPARROW +forward; bind HOME discard; bind PGUP changeteam; wait; bind W impulse 201; bind LEFTARROW +moveleft; bind [ crouch; bind ] dropitems; bind RIGHTARROW moveright
; wait; alias Switch switch+ wait; wait; wait; wait; wait; wait"
alias Switch "Switch+"

bind "ALT" "Switch"

When I Press the Alt key the first time it switches over to the disguise bindings as it should. When I Press it the second time it restores the bindings just as it should. However, when I pressed it again nothing happens.

You'll notice that the spy code contains more wait commands. This is my attempt to slow things down a bit because someone suggested that it might be too much to do in such a short time. I'm not even sure if that's the problem. Any help would be appreciated.
Hotterspur is offline   Reply With Quote


script, scripting

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 01:49 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.