Author Topic: Binding namechanges?  (Read 5331 times)

Bunneh

  • Posts: 105
  • Turrets: +18/-96
Binding namechanges?
« on: December 12, 2007, 11:30:50 pm »
Okay...I've got a .cfg in my base folder with entitled "namechanges.cfg". Here's the contents (slightly hard to read because of color tags, but you should be able to see through the ^1s and everything)

Code: [Select]
bind F8 "vstr Namechange1"
set Namechange1 "echo ^3|^2NUKE^3|^6Fluffeh Bunneh;bind F12 name '^3|^2NUKE^3|^6Fluffeh Bunneh'; bind F8 vstr Namechange2"
set Namechange2 "echo ^3|^2NUKE^3|^1C^2h^1r^2i^1s^2t^1m^2a^1s^2e^1h ^2B^1u^2n^1n^2e^1h;bind F12 name '^3|^2NUKE^3|^1C^2h^1r^2i^1s^2t^1m^2a^1s^2e^1h ^2B^1u^2n^1n^2e^1h'; bind F8 vstr Namechange3"
set Namechange3 "echo '^3|^2NUKE^3|^1Docteh Feelgood;bind F12 name ^3|^2NUKE^3|^1Docteh ^1Feelgood';bind F8 vstr Namechange1"

As you can see, pressing F8 tells me that my namechange is |NUKE|[name] which goes off without a hitch. However, when I press F12 to change it, it will only do the first word of the name before the space, then nothing. So, I end up with a name like Fluffeh, Christmaseh, or Docteh, instead of Fluffeh Bunneh, Christmaseh Bunneh, or Docteh Feelgood. What's the problem here? Any help would be appreciated.
Bunneh: I'll admit that I really love attentionwhoring like this.
Plague Bringer: Here's some attention for you. Look! I've got a video of Bunneh in his true form running around in public, molesting random people.
http://www.youtube.com/watch?v=ZONFBqPosXw
Bunneh, you should be ashamed.
Bunneh: No, PB, that's not me. I'ma pink Bunneh. Bluebunneh is the stupid icecream faggot down the street.

http://tremulous.net/forum/index.php?topic=6840.0

Knowitall66

  • Posts: 492
  • Turrets: +70/-52
Re: Binding namechanges?
« Reply #1 on: December 13, 2007, 12:57:04 am »
Spaces just dont work when setting name that way use an under score or something _

daenyth

  • Posts: 230
  • Turrets: +21/-26
Re: Binding namechanges?
« Reply #2 on: December 13, 2007, 01:41:42 am »
You have to quote the names in ""
Quote from: Bullislander05
It's like trying to take apple seeds out of a zebra to plant a giraffe tree.

Bunneh

  • Posts: 105
  • Turrets: +18/-96
Re: Binding namechanges?
« Reply #3 on: December 13, 2007, 09:07:22 pm »
Spaces just dont work when setting name that way use an under score or something _

In that case, why can you use /name "[name]" in console, with spaces, without problems?

I've tried using this before;

set Namechange1 "echo ^3|^2NUKE^3|^6Fluffeh Bunneh;bind F12 name "^3|^2NUKE^3|^6Fluffeh Bunneh"; bind F8 vstr Namechange2"

and it doesn't work. I'll try it again, though...will post back once I find out.
Bunneh: I'll admit that I really love attentionwhoring like this.
Plague Bringer: Here's some attention for you. Look! I've got a video of Bunneh in his true form running around in public, molesting random people.
http://www.youtube.com/watch?v=ZONFBqPosXw
Bunneh, you should be ashamed.
Bunneh: No, PB, that's not me. I'ma pink Bunneh. Bluebunneh is the stupid icecream faggot down the street.

http://tremulous.net/forum/index.php?topic=6840.0

daenyth

  • Posts: 230
  • Turrets: +21/-26
Re: Binding namechanges?
« Reply #4 on: December 13, 2007, 11:13:22 pm »
My bad, I came across a similar issue. you can't combine things like that with quotes, because quake has no method for escaping them. Try putting the bind in another vstr, eg set foo echo Name selected;vstr namechange; blah
Quote from: Bullislander05
It's like trying to take apple seeds out of a zebra to plant a giraffe tree.

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: Binding namechanges?
« Reply #5 on: December 24, 2007, 04:41:24 pm »
Just a small code change: quotes should be replaced with (). Then it would be possible.

Until then put name in a different set. Like
Code: [Select]
bind 1 "echo player name; bind 2 vstr name1"
set name1 name "player name"

I am making a very complicated yet easy set of binds. The only trouble is that numpad buttons have quite long names like kp_downarrow, should be kp_2.

Rocinante

  • Posts: 642
  • Turrets: +252/-668
    • My Homepage
Re: Binding namechanges?
« Reply #6 on: December 24, 2007, 11:18:40 pm »
I am making a very complicated yet easy set of binds. The only trouble is that numpad buttons have quite long names like kp_downarrow, should be kp_2.

bind kp_downarrow vstr kp_2
set kp_2 "your bind here"

Then you can work with kp_2 to your heart's content :P
}MG{Mercenaries Guild
"On my ship, the Rocinante, wheeling through the galaxies, headed for the heart of Cygnus, headlong into mystery." -- Rush, "Cygnus X-1"