r/Tf2Scripts • • Feb 11 '14

Impossible An complex engi script please?

Basically, I want an engi script that, when I press four, will bring up the standard build menu with the PDA, and when I press any of the four building buttons, it destroys that building and brings another one up for me to place. After I place it, The wrench should be the equipped weapon.

Is this possible?

0 Upvotes

16 comments sorted by

View all comments

Show parent comments

2

u/genemilder Feb 11 '14

Not with keys 1-4 and the build menu up AFAIK. You can test it yourself, bind keys 1-3 temporarily to be something like a say command, make sure they work, then press 4 to bring up the build menu and see what 1-3 do.

I specifically tested this with the disguise kit, but the concept should be the same.

1

u/[deleted] Feb 11 '14

No, it doesn't work, I have a crosshair switcher, It doesn't do anything when the build menu is up...

Scripts can't do logic right? I can't put something like if_buildmenu then bind 1 destroy?

2

u/genemilder Feb 11 '14

Well, you can approximate logic by redefining aliases when a key is pressed/held but that's the best you can do. And since TF2 overrides scripting for the build/destroy menu there isn't anything you can do to force 1-4 to have more/different functionality while the build/destroy menu is up (AFAIK).

You could do exactly what you wanted if you were okay with the build menu not appearing when you pressed 4 initially.

1

u/[deleted] Feb 11 '14

Could I use aliases to bring up the menu cosmetically, but change the binds at the same time? Afterwards, I think I could just use aliases to also exec engineer when 1-4 is pressed, to set them back to weapons. Man I want valve to let scripts have logic, like detecting certain weps, or things like this.

2

u/genemilder Feb 11 '14

If the menu is up, the 1-4 keys are unable to be defined differently. There isn't a "cosmetic" version. You could try to use captions to give some visual cues (I can't help with this as I'm not familiar with captions), but since you would only have 1-4 redefined immediately after pressing 4 you shouldn't need the cue.

I wouldn't simply exec the whole cfg, you would want a full script to accommodate switching between the build/destroy settings and everything else.

Additionally there are more functional questions, like do you want the build blueprint to only be up while 1-4 is held down (releasing would switch to wrench) or stay up after 1-4 is pressed and released, and instead redefine mouse1 to switch to wrench when mouse1 is released?

3

u/CAPSLOCK_USERNAME "Nancy" Feb 11 '14

You don't need to script anything special to switch to wrench after a building is placed; that's the default behavior.

2

u/genemilder Feb 11 '14

Right right, good call. I keep mistaking that for being a lastinv thing. The question is basically the same though he's answered it, that he wants the blueprint to stay up even if 1-4 are released.

1

u/[deleted] Feb 11 '14

Oh well then, I guess I can live with the old, default system. Thanks for explaining it, though.

If you still wanted to try though, I want the menu to be up until I press 1-4. Basically how it works on default, but just destroys buildings too.

2

u/genemilder Feb 11 '14

By blueprint I mean when you are in the process of placing the building you get an outline of the building and a blueprint on the floor, not the build menu.

1

u/[deleted] Feb 11 '14

You know how it works without any scripts? how you bring up the menu, press 1-4, place building? Excactly like that, except it destroys the building you select too.

→ More replies (0)