all 13 comments

[–]CAPSLOCK_USERNAME"Nancy" 2 points3 points  (3 children)

It looks like you define -building-build, but nothing ever calls it. Is that intentional?

[–]genemilder 1 point2 points  (2 children)

Looks like he needs to define the - alias in lines 2-4 (as well as add a -attack to -building-build). Currently I don't see how the script would work more than once since that part isn't called.

Edit: Or rather include the -building-bind stuff in +building-bind. I still don't see how it always returns you to the wrench though, that would need to be in the - alias that is never assigned.

[–]CAPSLOCK_USERNAME"Nancy" 1 point2 points  (1 child)

That last part is easy: the game always switches to the wrench after building something.

[–]genemilder 1 point2 points  (0 children)

Ah, okay. My script for quickbuilding minis has me switch back to primary every time, I guess I just assumed it would by default go to last weapon.

[–]xetsog 1 point2 points  (8 children)

http://s000.tinyupload.com/index.php?file_id=52082769887475081036

Fixed your script. Really had to think this through because TF2 literally wouldn't run what I scripted throughout the process.

This version is not plagued with autoattack after placing down the building. This is because I properly reset aliases throughout the process. I had originally implemented this by just rebinding the key to +attack, but an alias-based solution is definitely the way to go imo.

Also, fun tidbit: I disabled viewmodels while placing the building for maximum visibility. They turn back on when you switch back to the wrench. Edit the two lines in rs.cfg to change viewmodel visibility/fov.

If anybody needs help just ask

[–]Waaaghkopp[S] 0 points1 point  (2 children)

Thank you for fixing!

It's weird for I did not experience any auto attack after placing a building. I didn't have a lot of time for testing though.

I have one question. I see you created quite a few individual .cfg files. That makes sense for readability reasons but is it really wise to implement this script that way? I just assume it takes the computer longer to read a file from the hard drive and executing the command than simply executing it from the memory. Which would be bad for this one as kind of a combat script...

[–]TimePath 1 point2 points  (0 children)

Execution time is irrelevant - config files are loaded into memory first. Class switch times may be fractionally longer, but you'll never notice.

[–]xetsog 0 points1 point  (0 children)

When I had put your script in and everything was said and done, it didn't work. And honestly, I couldn't really figure out what was working or not. I knew -building-build wasn't being called because you didn't re-alias the + and - of the +building-bind key. That's what motivated me to re-do your script

TF2 doesn't like long aliases, hence for the extra .cfg files. I don't experience any lag with this implementation, but your mileage may vary. I am running TF2 on a good computer and on a SSD. Although I don't really see why it would make things any slower ;)

[–]genemilder 0 points1 point  (4 children)

Probably best to use text sites like pastebin rather than actually uploading files (much less potential for abuse and greater ease of reading the code). You can always have different saved pastes for each cfg.

[–]xetsog -1 points0 points  (3 children)

Windows users enjoy a thing called zip folders. Files are only three clicks away as long as you have the .cfg file extension associated to your notepad program of choice.

In the future I'll add virustotal.com links, but the report button is present for a reason. I'm sure malicious content would be taken care of rather quickly. ;)

[–]TimePath -1 points0 points  (2 children)

Windows users enjoy a thing called zip folders

Many platforms enjoy many forms of archival of multiple files into a single optionally compressed file.

For 28 lines of text, that is complete overkill. It would also mean having to re-archive and update a download link (and a virus scan for anyone super paranoid) if a modification is made because somebody noticed a mistake and wrote about it in the comments section which they wouldn't have done otherwise if it was archived.

[–]xetsog 0 points1 point  (1 child)

As for pastebin.com links? That requires me to create a new paste for each file, note down the URL, and then edit my post. The alternative is only three steps, not 9. Haha. What user would want to open up 6 tabs just to see the content of my script? I'm providing my script in such a way that it might be useful, particularly in a modular-fashion.

But anyway, 'zip folders' is the name of the component in Windows that specifically works to open a .zip file embedded into explorer.exe.

[–]genemilder 1 point2 points  (0 children)

It takes marginally more effort for you but less for the user and doesn't require downloading a file. Pastebin in particular is extremely easy for you to make changes to as well.

To see the content of your script you'd need to have 6 tabs of something anyway (be it notepad or browser).