Digital Paint Discussion Board

Paintball 2: The Game => Help and Support => Topic started by: 3xcl4m4t10n on November 08, 2013, 11:15:38 AM

Title: Help with some stuff!
Post by: 3xcl4m4t10n on November 08, 2013, 11: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
Title: Re: Scriptting problems (Maybe Bug)
Post by: rockitude on November 08, 2013, 11:33:28 AM
The code would help to give you an answer.
Title: Re: Scriptting problems (Maybe Bug)
Post by: 3xcl4m4t10n on November 08, 2013, 03: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.
Title: Re: Scriptting problems (Maybe Bug)
Post by: rockitude on November 08, 2013, 03: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.
Title: Re: Scriptting problems (Maybe Bug)
Post by: 3xcl4m4t10n on November 08, 2013, 06: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.
Title: Re: Scriptting problems (Maybe Bug)
Post by: ic3y on November 09, 2013, 11:22:52 AM
0 = unlimited
Title: Re: Scriptting problems (Maybe Bug)
Post by: 3xcl4m4t10n on November 09, 2013, 09: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!
Title: Re: Scriptting problems (Maybe Bug)
Post by: xrichardx on November 09, 2013, 09: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.
Title: Re: Scriptting problems (Maybe Bug)
Post by: 3xcl4m4t10n on November 10, 2013, 07:33:49 PM
Thanks xrichardx
Title: Re: Help with some stuff!
Post by: 3xcl4m4t10n on November 11, 2013, 05: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.
Title: Re: Help with some stuff!
Post by: rockitude on November 11, 2013, 06: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.
Title: Re: Help with some stuff!
Post by: 3xcl4m4t10n on November 12, 2013, 12:14:49 PM
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