Tremulous Forum
Mods => Modding Center => Topic started by: Bunneh 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)
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.
-
Spaces just dont work when setting name that way use an under score or something _
-
You have to quote the names in ""
-
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.
-
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
-
Just a small code change: quotes should be replaced with (). Then it would be possible.
Until then put name in a different set. Likebind 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.
-
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