Topic: Script Help
I'm trying to get this grenade script to work in COOP but the behavior is strange. Basically what I'm trying to do is let my teammates know I'm priming the grenade with a team vsay command like "Clear the path!" and then execute another vsay like "Fire in the hole" when I release the grenade.
I'm using Outcasts example but it's not working properly. It forces me to press attack again to release the grenade and I also have to toggle between the attack1.cfg and attack2.cfg for it to work at all again. Any script gurus out there?
Prime Grenade Script
-------------------------------------------------------------
Warn teammates about incoming grenades;
press key to switch to grenade and vsay_team ClearPath
release key to throw grenade and vsay_team FireintheHole
-------------------------------------------------------------
adjust binds like below,
bind x "weaponbank 1; exec attack1.cfg"
bind x "weaponbank 2; exec attack1.cfg"
bind x "weaponbank 3; exec attack1.cfg"
bind x "weaponbank 4; exec attack2.cfg"
bind x "weaponbank 5; exec attack1.cfg"
bind x "weaponbank 6; exec attack1.cfg"
-------------------------------------------------------------
Now create 2 extra .cfg files;
1= attack1.cfg, with:
--------------------------------------------------------------
bind mouse1 "+attack"
--------------------------------------------------------------
2= attack2.cfg, with:
--------------------------------------------------------------
bind mouse1 "+button4; vstr cgren; -button4"
set cgren "vstr cgren1"
set cgren1 "vsay_team ClearPath; +attack; set cgren vstr cgren2"
set cgren2 "vsay_team FireInTheHole; -attack; -attack; exec attack1; set cgren vstr cgren1"
--------------------------------------------------------------
will
NEVER
die!