l0rath Posted October 30, 2014 Posted October 30, 2014 Hi! I was sent here from the ET-Subreddit. I've been trying to get this script to work, that automatically triggers a team-msg when I cook a grenade & a vsay once I throw it. But somehow I can't get it to display an alternative text for the vsay FireInTheHole. bind 4 "vstr gt;weaponbank 4" set gtON "+attack;vstr grenadethON" set gtOFF "-attack;vstr grenadethOFF;vsay_team FireInTheHole ^7Throwing Grenade!;bind mouse1 +attack" set grenadethDefault "say_team ^7Timing Grenade! ;set grenadethON vstr nic" set grenadethON "vstr grenadethDefault" set grenadethOFF "set grenadethON vstr grenadethDefault" set gt "bind mouse1 +vstr gtON gtOFF;" As someone pointed out already this script is kinda unnecessary & I don't think I'm actually going to use it. But it still bugs me that it doesn't work... Can someone point out any mistakes, please? Thanks! Quote
Heretic121 Posted October 30, 2014 Posted October 30, 2014 Possibly encase the alt string in double quotes? ex: "^7Throwing Grenade!" Quote
l0rath Posted October 30, 2014 Author Posted October 30, 2014 Nope, doesn't work It still just plays the vsay & displays "Fire in the hole!". I've tested the script in vanilla, nitmod, jaymod & etpub - same results everytime. What I don't get is why this line works: set grenadethDefault "say_team ^7Timing Grenade! ;set grenadethON vstr nic" and this one doesn't: set gtOFF "-attack;vstr grenadethOFF;vsay_team FireInTheHole ^7Throwing Grenade!;bind mouse1 +attack" I've seen people rename the displaytext of a vsay, that can't be the problem. Quote
Leader RedBaird Posted October 30, 2014 Leader Posted October 30, 2014 (edited) It does work, but you have to press 4 each time you want to use it. I doesn't work for throwing a second grenade, unless you press 4 again. The team vsay can't be heard if you have /cg_novoicechats 1. I changed mine to 0 and I could hear the team vsay. and what is this, in the fifth line: set grenadethDefault "say_team ^7Timing Grenade! ;set grenadethON vstr nic" IOrath, you posted before me and left, before i finish my post here! I was perusing tthe logic of the nic. I see the say_team ^7Timing Grenade!, and hear and see the vsay_team FireInTheHole ^7Throwing Grenade Edited October 30, 2014 by RedBaird Quote
l0rath Posted October 30, 2014 Author Posted October 30, 2014 and what is this, in the fifth line: set grenadethDefault "say_team ^7Timing Grenade! ;set grenadethON vstr nic" Honestly, I have no idea... I just recently started playing again & dug out my old cfg stuff. Well... maybe this is an impossible task after all :/ Quote
Leader RedBaird Posted October 30, 2014 Leader Posted October 30, 2014 The team vsay can't be heard if you have /cg_novoicechats 1. I changed mine to 0 and I could hear the team vsay. Quote
l0rath Posted October 30, 2014 Author Posted October 30, 2014 (edited) I can hear the vsay, my problem is that it displays the standart 'Fire in the hole' instead of my alternative text. /e set gtOFF "-attack;vstr grenadethOFF;vsay_team FireInTheHole ^7Throwing Grenade!;bind mouse1 +attack" Edited October 30, 2014 by l0rath Quote
Leader RedBaird Posted October 30, 2014 Leader Posted October 30, 2014 Odd! I see the "Timing Grenade" and the "throwing Grenade", both in white. Quote
Leader RedBaird Posted October 30, 2014 Leader Posted October 30, 2014 Just discovered that if you do not "cook" the grenade, the second line does not show. If you do "cook" it a few seconds, the vsay_team and the "Throwing Grenade" will sound off and show. 2 Quote
staticwarp Posted November 9, 2014 Posted November 9, 2014 glad he followed my suggestions at the et subreddit and checked out our forum - wonder if he got this worked out? i haven't gotten into scripting yet so can't offer much help 1 Quote
Clan Friend SunLight Posted November 9, 2014 Clan Friend Posted November 9, 2014 (edited) I tested it, and it sort of works... unnecessary, but it works (tested on jaymod... not all mods support vsay + text, though) anyway there is a load of useless vstr in there... for example, why did you write: bind 4 "vstr gt;weaponbank 4" [...] set gt "bind mouse1 +vstr gtON gtOFF;" what's that gt for? you could just have done it like: bind 4 "bind mouse1 +vstr gtON gtOFF; weaponbank 4" and later, vstr nic ?? where is the set nic something? You forgot to paste it? I don't know what it's supposed to do... as i said, there is a lot of useless chains of nested vstr commands in that script of yours... It's a bit (actually, more than a bit) messy, and if you have more grenades, after you release fire it binds mouse1 back to +attack, so it works only with the 1st grenade... you could have rebinded mouse1 to +attack in the weaponbank bind, or maybe bind a separate button for 'fire in the hole' and be happy with that Edited November 9, 2014 by SunLight 2 Quote
Leader RedBaird Posted November 9, 2014 Leader Posted November 9, 2014 I just recently started playing again & dug out my old cfg stuff and later, vstr nic ?? where is the set nic something? You forgot to paste it? I don't know what it's supposed to do... He may be trying to modify old code for a new task while having forgotten some of the procedures for ET scripting. I know that feeling. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.