r/Tf2Scripts•
Loriael

[Script request] + Little help with viewmodel

Resolved

Hello, i need working script for spy(viewmodel on certain weapons, different crosshair, different sensitivity), atm i was using one created via "YetAnotherTF2ConfigGenerator" but since this update my game went nuts and is completly unplayable, this is what happends when i reload any weapon, attack and constantly when im in disguise kit - When im using aussie amby the texture is gold, so it has something to do with viewmodel.

Also i don't know if it's correct subreddit to ask, i can't turn my viewmodel on by any command, i tried r_drawviewmodel 1 and nothing.

Those are scripts i was using:

spy

autoexec

config

reset

Im gonna be on reddit for next 3-4 hours to provide any infos needed.

Thanks in advance

Posted Feb 12, 2015, 8:53 PM UTC · edited

16
genemilder•

Just like all generated configs this is confusing and without explanation. Great.

Now that my grumping is out of the way, we can start by looking at what's bound to your reload key:

bind r "+reload; current_vis_shootswitch"

current_vis_shootswitch is defined as current_vis_shootswitch_1 _2 and _3 in the switching logic but all three of those are defined as blank aliases. So that doesn't appear to be an issue.

You don't have a visible bind for the disguise kit that I can see, so I'll assume it's the same as stock. Which shouldn't cause a problem.

I'll guess that this issue is a graphical one rather than based on the switching code itself. That would suggest the problem lies somewhere in the "Options" portion of your script:

tf_remember_activeweapon 1 //this is needed for the weapon switching script, otherwise it gets out of sync on death/respawn
cl_autoreload 0
hud_fastswitch 1
hud_combattext 0
cl_use_tournament_specgui 1
cl_hud_minmode 1
//graphics options, I define them here so people will not have to edit stuff in the graphicsconfigs, they're outcommented in chris' graphics configs themselves
// Enable sprays
cl_playerspraydisable 0
r_spray_lifetime 2
// Enable gibs
cl_phys_props_enable 1
cl_phys_props_max 128
props_break_max_pieces -1
r_propsmaxdist 1000
violence_agibs 1
violence_hgibs 1
// Enable ragdolls
cl_ragdoll_fade_time 15
cl_ragdoll_forcefade 0
cl_ragdoll_physics_enable 1
g_ragdoll_fadespeed 600
g_ragdoll_lvfadespeed 100
ragdoll_sleepaftertime "5.0f"
cl_disablehtmlmotd 1
sv_cheats 1
cl_first_person_uses_world_model 0
mp_timelimit 0
mp_waitingforplayers_cancel 1
//Credit to CasualX for this stuff
alias play
alias sndplaydelay
alias playgamesound
alias soundfade
alias cl_spec_mode
alias rpt_connect
alias r_screenoverlay
alias closed_htmlpage
alias 

You're attempting to overwrite a number of aliases, which may be fine and may cause issues depending on the server. You appear to be using a custom HUD, and it's possible that some of the settings are interfering with that HUD (like min mode maybe?). I don't have experience with your issue and I'm not necessarily familiar with all of the lines above, so this is probably all the help I can directly give you on this issue.

Edit: Your config.cfg shows that you have viewmodel_fov "0.100000". That's probably not something you want and could maybe be a cause. Change it to 54, IIRC that's the default. Your viewmodel visibility is constrained by both viewmodel_fov and r_drawviewmodel.


Separate things:

  • Your script has a ton of issues with quotation marks, including simply using nested quotes (which is probably fine but can cause otherwise avoidable issues on occasion) and using an incorrect (unmatching) number of quotes. It's better to never use nested quotes, there's no situation where they add utility.

  • Your script attempts to call cl_crosshair_file "" within an alias multiple times, in my experience this is not functional. To get the default dynamic crosshairs back, you need to make a separate cfg file (like xh_default.cfg for example) and then put the line cl_crosshair_file "" in it. Then replace all instances of it in your other scripts with exec xh_default.

  • You don't need the spec_ commands for your mouse1 and mouse2 binds, shown below:

      bind MOUSE1 "+attack;; spec_next"
      bind MOUSE2 "+attack2; spec_previous"
    

    Simply binding directly to +attack and +attack2 is sufficient for those keys to work in spectator. Separately spec_previous isn't a valid command, it's spec_prev.

2
LoriaelOP•

Okay, you solved the graphic glitch, it was the viewmodel_fov fault, when i've set it to viewmodel_fov 54 it works normally, Thanks.

//

  • I know those scripts were messy but since they worked i was fine with it, today i wan't to clean the mess in them.

  • About my disguise kit, i'm using default setting with the 1-3 choosing and 6 to switch with red/blue and e lastdisguise;

  • Im running ToonHUD.

  • The custom config generator overwrite the +attack, +attack2 and +attack3 so they didn't worked to switch spectator and +attack3 wasn't activating shield/rage on MvM.

  • im using crosshair only for pistol on spy, on rest it's set to size 0, it by default uses crosshair i choose when im creating the config.

//

Bitw, is there a way to turn off dynamic amby crosshair? In the past it wasn't possible, idk if something changed since then, last time i checked was like in december 2014.

1
genemilder•
  • The custom config generator overwrite the +attack, +attack2 and +attack3 so they didn't worked to switch spectator and +attack3 wasn't activating shield/rage on MvM.

That makes sense, people overlook it all the time when they make attack aliases. You don't need the spec_ commands if you aren't messing with that, though.

  • im using crosshair only for pistol on spy, on rest it's set to size 0, it by default uses crosshair i choose when im creating the config.

If that's how you're using the crosshair it makes sense as you wouldn't be able to see the cfg failing to switch to the default dynamic crosshair.

Bitw, is there a way to turn off dynamic amby crosshair?

I don't believe so, but AFAIK HUD crosshairs don't grow so you could use a HUD crosshair instead and use the achievement tracker to have the HUD crosshair only show up on your revolver.

1
clovervidia•

ಠ_ಠ

Don't use tags like [these] or (these) in your title. Add flair once your post is submitted using the "flair" or "add tag" button below.

1
LoriaelOP•

Okay boss, gotta remember for next time.

1
clovervidia•

That's all I ask.

1