x
ETF2L is looking for new Staff to recruit! Are you interested in supporting the league? Then click here for more details on what we can offer and how to apply! 

Forum

Sniper Crosshair Help

Created 18th February 2010 @ 20:52

Add A Reply Pages: 1

Once

When I put the sniper script that removes the crosshair for sniper rifle into my sniper cfg, I start up TF2, and when I press 1,2,3,etc, it’s normal, but when I press Q, the crosshair for my SMG / Kukri is gone, anyone know how to fix this?

P.S – If this didn’t make sense tell me,but – ; tldr; crosshairs gone when I press Q for all my weapons (when im using the sniper rifle crosshair removal cfg thing)

looski

Sf

Solutions:
– Don’t use Q.
– Use a crosshair.

Also, why does it matter if your kukri has no crosshair? And you normally pull out the smg as a last stand where you will probably die anyway. If not, learn to use it without a crosshair or get one for your sniper rifle ^^

Once

I only use my SMG to finish off headshots, but sometimes when I quickswitch or something, It’s easier to track the middle with the crosshair, but I was just wondering if anyone had a script, or a solution. :p

ell

(ETF2L Donator)

Quoted from Once

When I put the sniper script that removes the crosshair for sniper rifle into my sniper cfg, I start up TF2, and when I press 1,2,3,etc, it’s normal, but when I press Q, the crosshair for my SMG / Kukri is gone, anyone know how to fix this?

P.S – If this didn’t make sense tell me,but – ; tldr; crosshairs gone when I press Q for all my weapons (when im using the sniper rifle crosshair removal cfg thing)

I haven’t seen this sniper script of yours but but I’m pretty confident about how to fix it. I assume it looks something like this?

alias “xslot1” “slot1; cl_crosshair 0”
alias “xslot2” “slot2; cl_crosshair 1”
alias “xslot3” “slot3; cl_crosshair 1”

bind “1” “xslot1”
bind “2” “xslot2”
bind “3” “xslot3”
bind “q” “lastinv”

Lets say we do the following:
(1) Have kukuri in equipped
(2) Press 1 to equp sniper rifle
(3) Press q to switch back to kukuri
This leads to the problem of the crosshair not showing up for the kukuri. Lets follow the aliases and see what happens. At (2) you press 1, which invokes “xslot1”, which in turn equips the sniper rifle and disables the crosshair with “slot1” and “cl_crosshair 0” respectively. The game now remembers the kukuri in slot3 as our last used weapon. When we press q at (3) the game simply switches back to that weapon. The lastinv function doesn’t care about that we bound 1,2 and 3 to also make changes to the crosshair. It’s only concerned with changeing the weapons in our hands. Instead,
the behaviour we’re looking for is this: http://img46.imageshack.us/img46/7752/sniperlastinvscript.png

A script might look like this:

alias “xslot1” “slot1; cl_crosshair 0; bind 1 xslots1; bind 2 s2lst1; bind 3 s3lst1”
alias “xslot2” “slot2; cl_crosshair 1; bind 1 s1lst2; bind 2 xslot2; bind 3 s3lst2”
alias “xslot3” “slot3; cl_crosshair 1; bind 1 s1lst3; bind 2 s2lst3; bind 3 xslot3”

alias “s1lst2” “xslot1; bind q xslot2”
alias “s1lst3” “xslot1; bind q xslot3”
alias “s2lst1” “xslot2; bind q xslot1”
alias “s2lst3” “xslot2; bind q xslot3”
alias “s3lst1” “xslot3; bind q xslot1”
alias “s3lst2” “xslot3; bind q xslot2”

bind “1” “xslot1”
bind “2” “xslot2”
bind “3” “xslot3”

It’s the same script as before, with one difference. In addition to changing slot and putting the crosshair on and off the xslots also make sure that, in the next transition, q will be bound to the currently equipped weapon. Make sure tf_remember_activeweapon “1”, this will keep track of your last used weapon after respawn. I also suggest that you swap cl_crosshair 0 for some kind of crosshair, in case you have to no-scope someone. There is a crosshair that looks like a dot that will fit nicely inside the scope projection.
You could even have buttons to adjust the it’s color if you want it to completely melt in, like this:

alias “xslot1” “slot1; chsniper; bind 1 xslots1; bind 2 s2lst1; bind 3 s3lst1”
alias “xslot2” “slot2; chdf; bind 1 s1lst2; bind 2 xslot2; bind 3 s3lst2”
alias “xslot3” “slot3; chdf; bind 1 s1lst3; bind 2 s2lst3; bind 3 xslot3”

alias “dfch” “cl_crosshair_file crosshair7; cl_crosshair_scale 32; cl_crosshair_red 0; cl_crosshair_green 255; cl_crosshair_blue 0”
alias “chred” “cl_crosshair_file crosshair3; cl_crosshair_scale 48; cl_crosshair_red 255; cl_crosshair_green 0; cl_crosshair_blue 0”
alias “chblu” “cl_crosshair_file crosshair3; cl_crosshair_scale 48; cl_crosshair_red 0; cl_crosshair_green 0; cl_crosshair_blue 255”

bind “uparrow” “alias chsniper chred”
bind “downarrow” “alias chsniper chblu”

alias “chsniper” “chred”

Another option is to simply skip the whole lastinv idea and bind your weapons to e, q and f. I use this setup and I find all weapon to be well within reach without having to use a lastinv macro. Oh, and I haven’t tried it so it’s not guaranteed to work on the first try.


Last edited by ell,

Once

alright so, I know nothing about scripts, so I got confused, but your saying put this into my sniper cfg;

alias “xslot1″ “slot1; cl_crosshair 0; unbind 1; bind 2 s2lst1; bind 3 s3lst1″
alias “xslot2″ “slot2; cl_crosshair 1; bind 1 s1lst2; unbind 2; bind 3 s3lst2″
alias “xslot3″ “slot3; cl_crosshair 1; bind 1 s1lst3; bind 2 s2lst3; unbind 3″

alias “s1lst2″ “xslot1; bind q xslot2″
alias “s1lst3″ “xslot1; bind q xslot3″
alias “s2lst1″ “xslot2; bind q xslot1″
alias “s2lst3″ “xslot2; bind q xslot3″
alias “s3lst1″ “xslot3; bind q xslot1″
alias “s3lst2″ “xslot3; bind q xslot2″

bind “1″ “xslot1″
bind “2″ “xslot2″
bind “3″ “xslot3″

if i put that, what do I put in my other class cfg’s to make it normal? :/

octochris

(0v0)

Quoted from Once

alright so, I know nothing about scripts, so I got confused, but your saying put this into my sniper cfg;
[…]

if i put that, what do I put in my other class cfg’s to make it normal? :/

cmds to rebind 1, 2 and 3 to their normal commands — this should do it:

bind 1 “slot1”
bind 2 “slot2”
bind 3 “slot3”

ell

(ETF2L Donator)

Quoted from Once

alright so, I know nothing about scripts, so I got confused, but your saying put this into my sniper cfg;
[…]

if i put that, what do I put in my other class cfg’s to make it normal? :/

The trick here is to look at everything that is being bound. Those things are the ones that can mess up your other configs. In this case it is 1,2,3 and q.
bind “1” “slot1”
bind “2” “slot2”
bind “3” “slot3”
bind “q” “lastinv”

There is also a possibility that your crosshair is not visible at the time you switch classes and you will have to put a cl_crosshair “1” in every other class config to make sure that it will be turned on when you switch to that class.

octochris

(0v0)

whoops, didn’t see q.

ell

(ETF2L Donator)

I strongly recommend that you learn how the script language works if you plan on using scripts. I would like to claim that it is easy, but i know how working with something for a long time tends to cloud your judgement on what’s trivial and what isn’t, so I won’t. The language is VERY small, and can be picked up quickly. You can start off here http://tf2wiki.net/wiki/Scripting#What_are_binds.3F and then find someone to ask the right questions. For instance, people waiting in the pickup channels would probably be glad to help you out, just to pass the time. Check out #mpuktf2.pickup on quakenet.


Last edited by ell,

Use binds

Add A Reply Pages: 1