So, actually that idea I had managed to fix my problems. I still dont know what they were tho.
So: I have finished my config scripting (for the mo) and I’m gonna post it so tell me what you think. Bear in mind that I only started with this whole scripting thing today so I dont really know what I’m doing. Maybe someone knows better ways of doing what I have done. But tbh I am fairly proud of it.
Basically, this script is a collection of class specific scripts such that when you go field ops, say, and switch to airstrikes, the first time(only) you press the attack button, it gives out a team message saying what you are doing. Its kinda helpful I think, to keep your teammates informed about what you are doing, and tell them when to move out the way. I havent done cvops/soldier yet, mainly cus I cba. I’d like to do a similar thing with grenades but am not sure how to get it to work(think I will leave that for a while).
Okay here goes:
Autoexec.cfg addition:
exec class.cfg
Class.cfg:
// Allied Classes
set b_medic “team b 1”
set b_engr “team b 2; set engr vstr b_engr”
set b_fieldops “team b 3”
// Axis Classes
set r_medic “team r 1”
set r_engr “team r 2; set engr vstr r_engr”
set r_fieldops “team r 3”
// The selection
set my_team_allied “echo Team set ^4Allies; set medic vstr b_medic; set engr vstr b_engr; set fieldops vstr b_fieldops; set team_swap vstr my_team_axis”
set my_team_axis “echo Team set ^2Axis; set medic vstr r_medic; set engr vstr r_engr; set fieldops vstr r_fieldops; set team_swap vstr my_team_allied”
set team_swap “vstr my_team_allied”
// and the binds
bind F9 “vstr team_swap”
bind F6 “vstr medic; exec Medic.cfg; say_team ^4–Going ^1Medic^4–”
bind F7 “vstr engr; exec Engineer.cfg; say_team ^4–Going ^1Engineer^4–”
bind F5 “vstr fieldops; exec Fieldops.cfg; say_team ^4–Going ^1Field Ops^4–”
bind F8 “exec reset.cfg”
And an example of one of the class specific config(the others are pretty much the same but with diff. messages).
Fieldops.cfg:
bind 1 “weaponbank 5; exec Airstrike.cfg”
bind 2 “weaponbank 6; exec Ammodrop.cfg”
bind CAPSLOCK “weaponbank 1; exec resetattack.cfg”
bind F “weaponbank 2; exec resetattack.cfg”
bind 3 “weaponbank 3; exec resetattack.cfg”
bind 4 “weaponbank 4; exec resetattack.cfg”
bind Z “weaponbank 7; exec resetattack.cfg”
bind MWHEELDOWN “weapprev; exec resetattack.cfg”
bind MWHEELUP “weapnext; exec resetattack.cfg”
resetattack.cfg:
bind MOUSE1 “+attack”
reset.cfg:
bind MOUSE1 “+attack”
bind 1 “weaponbank 5”
bind 2 “weaponbank 6”
bind CAPSLOCK “weaponbank 1”
bind F “weaponbank 2”
bind 3 “weaponbank 3”
bind 4 “weaponbank 4”
bind Z “weaponbank 7”
bind MWHEELDOWN “weapprev”
bind MWHEELUP “weapnext”
airstrike.cfg:
set doer “+attack; say_team ^4–Throwing ^1Airstrike^4–; -attack;exec resetattack.cfg”
bind MOUSE1 “vstr doer”
ammodrop.cfg:
set doer “+attack; say_team ^4–Dropping ^1Ammo^4–; -attack;exec resetattack.cfg”
bind MOUSE1 “vstr doer”
btw, thanks alot to the peeps who do that http://planetwolfenstein.com/4newbies/ site as it helped me alot and my class.cfg bit is basically an edited version of one from there