AvaMods 5.o Forums (https://forums.avamods.com/)
-   Media Dump (https://forums.avamods.com/media-dump/)
-   -   DOT xhair sprites. (https://forums.avamods.com/media-dump/524-dot-xhair-sprites.html)

REDRUM January 6th, 2007 03:37 AM

Quote:

Originally Posted by Jonny Automatic (Post 4725)
read only?

how do i do that though... wait nm.. duh.. i just remebered.. thanks

Jonny Automatic January 6th, 2007 12:55 PM

dunno if it will fix... but it seemed a good idea..

coltron January 6th, 2007 02:36 PM

Quote:

Originally Posted by iTzAleX{n00bish} (Post 4754)
can sum1 tell me how to put it in a folder and wutever

lik how do i put /steam/steamapps/YOURNAME/day of defeat/dod/sprites folder in?


you replace the .spr

stop eating paint.

iTzAleX{n00bish} January 8th, 2007 04:47 PM

yea mostly i never had a computer class in grade or middle school...

HAWKEYE January 8th, 2007 08:43 PM

i am freakin comp illiterate someone help me >.<:confused: withe crosshairs thing.

REDRUM January 10th, 2007 10:16 PM

this is funny.. lol..

Sapphyre February 14th, 2007 01:06 PM

I'm bloody clueless at this

I've done the first bit placing CustomXHair.spr into the right folder

so...

1. How do I download or save this userconfig.cfg? Am I meant to create a notepad for it?

2. What does bind a key ingame to "xtog" mean?

coltron February 14th, 2007 01:14 PM

for usercfg.cfg you make that file in notepad yes.. save all that xtog crap in it.

then you go in your console in game, and type bind "key" xtog. that lets you cycle throught the different ones.

santa_sh0t_tupac February 14th, 2007 11:51 PM

Here we go.
 
Quote:

Originally Posted by Emerald
What does bind a key ingame to "xtog" mean?

Ok. Quick breakdown of the XTOG script and a mini-script lesson while we're at it. I will assume a basic knowledge of computers and concepts (such as VARIABLES).

Code:

alias xtog "xtog1"
alias xtog0 "gl_spriteblend 1; cl_xhair_style 0; alias xtog xtog1"
.
.
.
alias xtog20 "gl_spriteblend 0; cl_xhair_style 16; alias xtog xtog0"

ALIAS. The alias command accepts 2 parameters (also called arguments) of the format:
Code:

alias NAME "COMMANDS"
It assigns the "COMMANDS" portion to the function NAME. This simply means that we can access "COMMANDS" by using NAME. The reason we use quotes is to be more specific. It will accept unquoted arguments, however, to BE SURE that you don't include unwanted information, we use the quotation marks as DELIMITERS.

Quote:

de·lim·it·er (dĭ-lĭm'ĭ-tər) Pronunciation Key
n. Computer Science
A character or sequence of characters marking the beginning or end of a unit of data.
EXAMPLE:

Code:

alias CHANGEMYNAME "name MeinGottHasSexyManBoobs"
So whenever I were to use CHANGEMYNAME..it would actually execute the information inside the quotations, which is simply to change your name.

A nice feature of the ALIAS command..is that you can assign it to other ALIAS'ed code blocks!

EXAMPLE:

Code:

alias CHANGEMYNAME "ABC"
alias ABC "name DiamondLooksLikeJesus"

So the first line says -Hey..whenever they use CHANGEMYNAME..they want to execute ABC.- You can see in the 2nd line that ABC holds the command to change a name. So it'd be like:
CHANGEMYNAME ---> execute "ABC" ---> ABC ---> execute "name DiamondLooksLikeJesus"

So the first line of our script file so far:
Code:

alias xtog "xtog1"
***NOTE: Generally, when programming, you want to name variables in a way that makes it easy to figure out what they are. XTOG stands for "X"hair "TOG"gle.***

This line is important. We will use THIS FUNCTION NAME (XTOG) to assign a key to. This key will cycle us through each crosshair. So we want XTOG to execute "xtog1" whenever we call it. Easy enough. On to line 2 (and the subsequent lines):

Code:

alias xtog0 "gl_spriteblend 1; cl_xhair_style 0; alias xtog xtog1"
You see those semi-colons? They act as delimiters for seperate commands. This way we can include multiple commands inside of one code block. So we know that xtog0 is going to execute some commands. What are they? Let's go one by one.

Code:

gl_spriteblend 1;
This piece of code is assigning a value to a variable. More specifically, these variables are called CVARS ("Configuration Variables"). They allow us to set information that the target program uses. In this case, we're setting information for the half-life engine to use. Some CVARS in half-life/HL mods are preceded by IDENTIFIERS. If you see something with "gl_" then you know that variable directly deals with the client side graphics. "sv_" is a server set variable. "cl_" is a client side generic variable. "r_" deals with client side rendering. Here is a comprehensive list of CVARS (though by no means a complete list).

http://commands.planethalflife.games...ds/index.shtml

So we find that gl_spriteblend turns on/off (by specifying a 1 or 0)..well..sprite blending.

Code:

cl_xhair_style 0;
Ah. We know immediately that this is a CVAR..and the preceding identifier is "cl_". This means it's a client side variable. It happens to set the number of the crosshair in your .spr file that you would like to use. A value of "0" here sets your crosshair to the default dod crosshair you had selected.

Code:

alias xtog xtog1
What's going on here? We're re-assigning XTOG? That's right. This is the way you make a toggle script. This will allow us to assign XTOG to one key..then be able to press that one key repeatedly to cycle through commands. We just redirect the original alias to the next bit of code we want to happen whenever the key is pressed. So as it stands..when this piece of code executes..the next time we press the key we bound to XTOG..it will execute XTOG1.

Code:

alias xtog20 "gl_spriteblend 0; cl_xhair_style 16; alias xtog xtog0"
I included this one so you can see the last piece of code that resets the whole cyclic toggle. Specifically:

Code:

alias xtog xtog0
This piece of code will reset your bound XTOG key...and make it execute xtog0 the next time the key is pressed. Thus, the whole thing loops infinitely.

This brings us, finally, to "what does binding 'xtog' to a key mean?" In order to execute all those nifty functions we have...we have to be able to tell the game to do so. We can't just yell at our monitor. Half-life allows you to BIND your keys to different functions. This means that whenever we press that key..it will execute the function(s) we told it to. "xtog" is the function we need to call to make our script cycle through. There are multiple ways of binding keys. For our example, you'll want to put this piece of code somewhere in your USERCONFIG.CFG.

General BIND command format:
Code:

bind "KEY" "COMMANDS"
Generic XTOG BIND.
Code:

bind "KEY" "xtog"
Replace KEY with the KEY you want to use. For example:

Code:

bind "K" "xtog"
This will make it so that when I press K..it will execute "xtog".

*The USERCONFIG.CFG will only execute when a particular game is run. This way we can change bindings depending on our mod. So I can have different CS binds from DOD.*

I hope this helped in some way. If I've confused the tar piss out of you..I apologize. This was a very, very quick explanation with little depth and the assumption you understand certain computer concepts. If you have questions..feel free to PM me. I'll be more specific with more exacting questions.

GO GO GO GO GO GO GO GO GO OWNED.

diamond-optic February 15th, 2007 05:03 PM

i bet that confuses ppl even more lol


All times are GMT -4. The time now is 07:05 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.

2005-2006  team cdrive 
2006-2007 AvaMods 0.x
2007-2008 AvaMods 1.x
2008-2012 AvaMods 2.x
2013-2014 AvaMods 3.o
2014-2016 AvaMods 4.o
2016-2025 AvaMods 5.o