| How to make an Ammo Bar Hud for PJ Wep/Inv Hud - (0 comments) |
AKA Panama Jack on 03-27 2:45PM |
Ok, let's create your own Ammo bar directory. Say...
trinityammobar
You should make the directory name unique and it should be located in base/textures/schemes and in that directory you will have 3 PNG files.
ammobackground.png - This is what is shown when you have full ammo.
ammowipe.png - This is what is shown when you have no ammo. The graphic is slowly expanded over the ammobackground.png gradually blocking it out. This graphic should exactly cover the portions of your background graphic that represent the guage part of your ammobackground.png.
ammocover.png - This can be transparent or any kind of overlay graphic on top of the other two graphics. If transparent make it the same size as the background graphic.
huddata.cs - This contains all of the information on how the ammo bar hud is to be used.
| Code: |
new ScriptObject(PJAmmoHudData){
// main hud cluster size
mainextent = "45 90";
wipeposition = "0 0";
wipeextent = "45 90";
Horizontal = 0; // 0 = verticle hud, 1 = horizontal hud
LeftRight = 1; // 0 = left empty/right full, 1 = left full/right empty
// font size
fontType = "Verdana Bold";
fontSize = 12;
fontcolor = "255 255 255 255";
};
|
| Code: |
The following is a legend explaining the items in the script object above.
mainextent - the number of pixels wide and high of the background graphic.
wipeposition - The x/y coordinates inside the mainextent to position the wipe graphic. This is because you can create a wipe graphic that is smaller than the background graphic. You should normally use "0 0".
wipeextent - This is how many pixels wide and high the wipe graphicis and it is usually the same size as the background graphic.
Horizontal - This is the direction the hud will be oriented.
0 - means a vertical hud. The vertical hud can only wipe from the top of the graphic to the bottom of the graphic as ammo is being used.
1 - means a horizontal hud.
LeftRight - If a horizontal hud is selected you can control the direction the bar will wipe from as ammo is being used.
0 - means the bar will wipe from right (full) to left (empty)
1 - means the bar will wipe from left (full) to right (empty)
The Font Size, Type and Color are not used at this time.
|
There is one last thing you need to create and that is the COL file. This is a simple text file that identifies your new ammo bar hud to the game. Just open any text editor like Notepad and enter in only THREE lines of text. Example:
What you are calling the hud.
The author name
PJ Ammo Bar Hud
The third line MUST be EXACTLY as shown or the new ammo bar hud will not be recognized.
Now save this using the exact name of the directory and append .col to the name. Save as...
trinityammobar.col
The above file and directory should be placed in the schemes directory. You can now start Tribes 2 and open the options for PJ Wep/Inv Hud. Click on the Ammo Bar button and you will see your ammo bar listed. Double click on it to test it out to see how it looks. If you are ready to try it in a game select it and host your own game. Once hosted move the ammo bar to where you want it and try it out with the various weapons to make sure it works like you want.
That's it!
PJ
|
| Gui Tutorials - (0 comments) |
AKA Panama Jack on 03-02 5:10PM |
You may have noticed that I have started posting FAQ's in the FAQ area. Well, I am finally going to be posting Tutorials on how to make your own in game replacement huds for the Compass Hud, Objective Hud, Weapon/Inventory Hud and Ammo Hud.
Plus I will be explaining how to merge all of them together along with Speed Hud, Chat Hud and Time Hud into a single hud replacement file that has layout for any resolution you want. You can even have multiple layout styles within a single new full hud replacement.
Making complete hud replacements will be easier than you can ever imagine. No programming knowledge is needed. It is fairly simple. Plus you can adjust hud positions on the hud layout without ever hosting a game.
Look for the first tutorial to be place here sometime later this week.
|
|
|