Author Topic: Help with some stuff!  (Read 3668 times)

3xcl4m4t10n

  • PGP
  • Posts: 8
Help with some stuff!
« on: November 08, 2013, 10:15:38 AM »
Hi:

Im making a script to turn 180º by pressing a button. The scripts runs well but i found a strange glitch. It,  aparently, don't work randomly... Can it be an engine bug/glith?

Thank you
« Last Edit: November 11, 2013, 04:27:52 PM by 3xcl4m4t10n »

rockitude

  • Committee Member
  • 68 Carbine
  • Posts: 492
Re: Scriptting problems (Maybe Bug)
« Reply #1 on: November 08, 2013, 10:33:28 AM »
The code would help to give you an answer.

3xcl4m4t10n

  • PGP
  • Posts: 8
Re: Scriptting problems (Maybe Bug)
« Reply #2 on: November 08, 2013, 02:14:14 PM »
The code is quite simple:

Code: [Select]
bind MOUSE4  "turn"
alias 2waits "wait;wait"
alias turn   "cl_yawspeed 180000;+right;2waits;-right;cl_yawspeed 140"

As you can see, i just declare the alias turn, first modify the yawspeed to be right the needed one to turn 180º in 2 ms. Declare the speed, turn, 2ms, stop turn and then return the default yawspeed (the same i use). I also try it with a different button (i start to think it causes to a rawmouse issue) but it keep happening. In other q2/q3 engine games it don't happen.

rockitude

  • Committee Member
  • 68 Carbine
  • Posts: 492
Re: Scriptting problems (Maybe Bug)
« Reply #3 on: November 08, 2013, 02:25:12 PM »
Code: [Select]
alias turn"set clmaxfps $cl_maxfps;set clyawspeed $cl_yawspeed;cl_yawspeed 18000;cl_maxfps 100;4waits;+right;4waits;4waits;-right;cl_maxfps $clmaxfps;cl_yawspeed $clyawspeed"
This should work.

3xcl4m4t10n

  • PGP
  • Posts: 8
Re: Scriptting problems (Maybe Bug)
« Reply #4 on: November 08, 2013, 05:11:35 PM »
Thank you so much it seems to work. Can you explain me what the pre $ means? Also you put 4waits so i supoused i must rewritte 2waits like:

Code: [Select]
alias 4waits "wait;wait;wait;wait"
What's cl_maxfps do? I think it was the maximum fps it can work but i have it at 0 O_o

Thank you again.

ic3y

  • Committee Member
  • Autococker
  • Posts: 1398
Re: Scriptting problems (Maybe Bug)
« Reply #5 on: November 09, 2013, 10:22:52 AM »
0 = unlimited

3xcl4m4t10n

  • PGP
  • Posts: 8
Re: Scriptting problems (Maybe Bug)
« Reply #6 on: November 09, 2013, 08:10:36 PM »
Thanks ic3. It is best to remain 0 or change it value? 125? Let see if someone can respond me it and the others questions.

Thank you all!

xrichardx

  • 68 Carbine
  • Posts: 295
Re: Scriptting problems (Maybe Bug)
« Reply #7 on: November 09, 2013, 08:23:43 PM »
the previous $ means that the value of the variable will be put there.
"set a bcd" will set "a" to "bcd".
"set a $bcd" will set "a" to the content of "bcd".

You can limit your fps with cl_maxfps if you want. This will give you one advantage: Less power consumption on your graphics card and followed by that a cooler graphics card --> cooler computer --> cooler room and less power costs. I currently have mine limited at 250 fps.

3xcl4m4t10n

  • PGP
  • Posts: 8
Re: Scriptting problems (Maybe Bug)
« Reply #8 on: November 10, 2013, 06:33:49 PM »
Thanks xrichardx

3xcl4m4t10n

  • PGP
  • Posts: 8
Re: Help with some stuff!
« Reply #9 on: November 11, 2013, 04:30:29 PM »
Another little question:

I want to writte my nick name with numbers but i want to writte it directly on the CFG file. Any guide? Also how i can put symbols like ";" or "_"? When i writte it on a cfg and save, the game didn't recognize the bind.

Thank you again.

rockitude

  • Committee Member
  • 68 Carbine
  • Posts: 492
Re: Help with some stuff!
« Reply #10 on: November 11, 2013, 05:35:12 PM »
It's complicated, because this game has it's own char_map for color- and funletters. Just colored letters are easy when you have other colored binds in your config. A color starts with something like a "^" followed by another letter that stands for the different colors. So you can copy the "^" from another colored bind and add for example an "A" for red, a "S" for blue or a "D" for yellow.

3xcl4m4t10n

  • PGP
  • Posts: 8
Re: Help with some stuff!
« Reply #11 on: November 12, 2013, 11:14:49 AM »
Thanks rocktitde.

I make my name with colors in other cfg but when i copy it on my own cfg it  take broken characters. Any help?

EDIT: Ok, the cfg text wasn't at ANSI codification :P