View previous topic :: View next topic |
Author |
Message |
Monk Registered User
Joined: 29 Aug 2001 Location: NY/MA Posts: 957
|
Posted: Fri Jan 31, 2003 3:44 pm Post subject: Help a n00b scripter. |
|
|
I tried editing my detpack key to notify my team when I placed a detpack. The code is as follows.
Code: | bind "m" "+det5; say_team Detpack blowing in 5 seconds. Get out of the way!" |
It does work, but not perfectly. When I press the m key to place a detpack the message displays with a number on the end. The number is usually a three digit number, e.g. 109. The problem is that it enters the message again when I release the key. This results in the message being displayed twice whenever I try to set a detpack. To make matter worse, the message is displayed even when I am typing and hit the m key in a message. I also did the same bind with +det20 and +det50 and I have the same problem.
Does anybody know how to fix this? Thanks in advance for any help you guys can give me. _________________ Amen!
<TVB>Monk - Burning HWGs since 2001.
Now located at The Pensive Penguin. |
|
Back to top |
|
|
GoldenSpy Registered User
Joined: 08 Jan 2002 Location: St. Louis, Missouri Posts: 276
|
Posted: Fri Jan 31, 2003 4:40 pm Post subject: |
|
|
I think the probly with the game saying it twice is related to the fact that you have to hold m for a detpack, but a text bind is only a single hit. As for it being displayed while you're typing, that has never happened to me. In my experience its never done anything (default bind or if I did it myself) while I was typing. are you sure you didn't miss your chat button and only think you were typing?
|
|
Back to top |
|
|
Violent Pacifist Registered User
Joined: 29 Dec 2001 Location: Ft. Worth, TX Posts: 1776
|
Posted: Fri Jan 31, 2003 5:48 pm Post subject: |
|
|
I saw your post on Custom TFC Monk, and tried to fix what you're talking about. After a couple minutes of playing aound with the demoman.cfg, I fixed it completely Not too sure what your problem was, I think it had something to do with the fact that you bound m to the exact commands...
Here's what I came up with...
alias +doit "+det5;+sayit"
alias +sayit "say_team Detpack blowing in 5 seconds. Get out of the way!"
alias -doit "-det5;bind m +doit"
bind m "+doit;bind m -doit"
The alias defines what +doit, -doit, and +sayit are. Taking your say_team command and making it it's own command, made it so that you didn't say the line twice and pressing m while typing didn't make you say the line )phew, mouthful...). The fact that I bound m to +doit and to -doit afterwards, is that it allows you to pick up your detpack again if you want to move somewhere else.
In other words, as far as I can tell, the only thing wrong with this is that if you accidentally press m while running around and don't have a detpack (doesn't happen if you're typing, though), it'll say the line and nothing else.
Also, if you want the 25 and 50 det, just change the -det5 and +det5 to the appropriate commands. _________________
We are the music makers, and we are the dreamers of dreams. |
|
Back to top |
|
|
Vulcan Registered User
Joined: 29 Dec 2001
Posts: 2773
|
Posted: Fri Jan 31, 2003 5:53 pm Post subject: |
|
|
Scripts? Boo. Bad bad bad. _________________ I need to make a sig, but I don't have the time. Maybe I will eventually. |
|
Back to top |
|
|
Violent Pacifist Registered User
Joined: 29 Dec 2001 Location: Ft. Worth, TX Posts: 1776
|
Posted: Fri Jan 31, 2003 6:09 pm Post subject: |
|
|
okay, I won't get on a script rampage, but saying scripts are bad is just a little annoying
Yes, some scripts are bad and some aren't. You can do a lot with scripts. What Monk wanted was about as worthy of being called a script as a bound saying is. You don't have to type it, so you don't have to worry about death, that's scripting right? Having the game do something for you instantly that would normally take time?
Besides, everybody that plays the game uses a script. +attack1 -attack1, move forward, sideways, blahblahblah are all scripts. Saying you don't use scripts is like saying you don't breath in real life... _________________
We are the music makers, and we are the dreamers of dreams. |
|
Back to top |
|
|
Dahak Registered User
Joined: 10 Feb 2002 Location: Rochester, NY and Windsor, CT Posts: 923
|
Posted: Fri Jan 31, 2003 6:14 pm Post subject: |
|
|
i don't breathe, i suck and blow air. |
|
Back to top |
|
|
Darkath Registered User
Joined: 07 Aug 2002 Location: Portland, OR Posts: 639
|
Posted: Fri Jan 31, 2003 6:22 pm Post subject: |
|
|
alias detblow detblow1
alias detblow1 "+det5; say_team Detpack blowing in 5 seconds, get out of the way"
bind "key" "detblow" _________________
^^^ Clicky |
|
Back to top |
|
|
Monk Registered User
Joined: 29 Aug 2001 Location: NY/MA Posts: 957
|
Posted: Sat Feb 01, 2003 11:19 am Post subject: |
|
|
Thanks VP. I just stuck that in my config now I will give it a shot. Could you just run it through me one more time how you create a similar bind for det20 and det50? I assume you just do the same thing with a different alias name right? _________________ Amen!
<TVB>Monk - Burning HWGs since 2001.
Now located at The Pensive Penguin. |
|
Back to top |
|
|
PondScm007 Registered User
Joined: 13 Oct 2002 Location: central nj Posts: 963
|
Posted: Sat Feb 01, 2003 11:23 am Post subject: |
|
|
Dahak wrote: | i suck and blow |
yes...yes you do...
VP beat me to it ;>, id say make an alias instead of having it all lumped in 1 stiring...helps sometimes _________________ my pic host-age died!
BR, yo |
|
Back to top |
|
|
Violent Pacifist Registered User
Joined: 29 Dec 2001 Location: Ft. Worth, TX Posts: 1776
|
Posted: Sat Feb 01, 2003 11:35 am Post subject: |
|
|
Sure Monk. Just change the +det5 and -det5 to a +det20 and -det20 and a +det50 and -det50 _________________
We are the music makers, and we are the dreamers of dreams. |
|
Back to top |
|
|
Monk Registered User
Joined: 29 Aug 2001 Location: NY/MA Posts: 957
|
Posted: Sat Feb 01, 2003 12:04 pm Post subject: |
|
|
Thanks a lot guys. I got it working now.
And for all you script haters, I am with all of you when it comes to altering things like laying pipes, or bunnyhopping. When you alter the way the game is supposed to be played than you have an unfair advantage on public servers, but if you are just communicating with your team I don't see a problem. Comm scripts only improve teamplay in my opinion and don't give any individual an advantage.
Scripts that allow you to do things like rocket jump or bhop are low in my opinion. If it is something that allows you to do something that would normally take practice than that is cheating. From what I understand of bunneyhopping is that it can be learned with lots of practice. I have however seen scripts available that claim to allow you to bhop simply by holding down your forward key.
Anyway, I don't want to get into a big argument about it. But I would love to hear why people don't like comm scripts. I know lots of people who have keys bound to say things like "BURN BURN BURN", or something funny when they kill somebody or enter the game. These are obviously fine since it doesn't alter game play. How is a simple comm script like the one VP just helped me with any different? _________________ Amen!
<TVB>Monk - Burning HWGs since 2001.
Now located at The Pensive Penguin. |
|
Back to top |
|
|
|