What's new

Discussion Moar Hudelems

  • Thread starter XeXWill
  • Start date
  • Views 1,209
XeXWill

willdebeers

Enthusiast
Messages
892
Reaction score
396
Points
150
Sin$
0
So I figured out a trick on how to add more hud elems and such


2c862e7505a21db9517635daadffec0e.png

Oh yeah I also figured out a neat way to have universal button monitoring. Needs a restart but works for everyone and isnt that weird weapon method if anyone is interested on that i'll probably make a tutorial on how to do that properly


Ok guys, here is the download to this menu inside a common.ff
http://www.mediafire.com/?mh1tv8mbe9lv7vu

Please bear in mind that I am very new to gsc, and the coding is very bloated and inefficient. Could definitely be streamlined.

The whole thing works off an exploit in the game to do with the colouring, ^1 ^2 etc. As those colour codes count as characters but are invisible, you can do spacing with them. I know its cheating, but it allows huge menus like this to be made using very few hud elems.


The universal monitor uses button binds, where each button bind is given a code. Say "dpad up" is attack, melee, and dpad down is attack, usereload. You would do something like this:

Code:
if(self attackButtonPressed())
{
if(self meleeButtonPressed())
{
//notify dpad up
}
if(self useButtonPressed())
{
//notify dpad down
}
}

And for the button binds you would do this:

Code:
self setClientDvar( "activeaction", "bind DPAD_DOWN vstr godown;bind DPAD_UP vstr goup" );
 
self setClientDvar( "godown", "+attack;+usereload;wait 20;-attack;-usereload" );
self setClientDvar( "goup", "+attack;+melee;wait 20;-attack;-melee" );
 
Last edited:
R i L E Y

R i L E Y

Enthusiast
Messages
869
Reaction score
172
Points
125
Sin$
7
So I figured out a trick on how to add more hud elems and such

I will release if anyone cares about it anymore lol

2c862e7505a21db9517635daadffec0e.png

Oh yeah I also figured out a neat way to have universal button monitoring. Needs a restart but works for everyone and isnt that weird weapon method if anyone is interested on that i'll probably make a tutorial on how to do that properly

u should
 
Zero Two

Zero Two

Getting There
Seasoned Veteran Grizzled Veteran
Messages
1,025
Reaction score
372
Points
190
Sin$
7
Hmmm sounds interesting. I think you should release :tongue:
 
QM Haackz

QM Haackz

Getting There
Messages
1,346
Reaction score
359
Points
180
Sin$
0
So I figured out a trick on how to add more hud elems and such

I will release if anyone cares about it anymore lol

2c862e7505a21db9517635daadffec0e.png

Oh yeah I also figured out a neat way to have universal button monitoring. Needs a restart but works for everyone and isnt that weird weapon method if anyone is interested on that i'll probably make a tutorial on how to do that properly
release once you have tried with four players

Edit - the all buttons button monitoring is possible without a restart for all players
 
XeXWill

willdebeers

Enthusiast
Messages
892
Reaction score
396
Points
150
Sin$
0
release once you have tried with four players


I dont have a jtag, and I dont have a disc to burn it to try online

I will release a common with the menu built-in for anyone that wants to try it
 
coolbunnymodz

coolbunnymodz

The Original Bunny
Programmer 10th Anniversary Mythical Veteran
Messages
4,386
Reaction score
1,308
Points
650
Sin$
0
I dont have a jtag, and I dont have a disc to burn it to try online

I will release a common with the menu built-in for anyone that wants to try it

Release it definitely, HUD Elems really limit what we can do creative wise with menus.
 
XeXWill

willdebeers

Enthusiast
Messages
892
Reaction score
396
Points
150
Sin$
0
Released and kinda described methods

Its all in the common I provided, although the coding is bad it works really well.

First game needs a restart!!!
 
coolbunnymodz

coolbunnymodz

The Original Bunny
Programmer 10th Anniversary Mythical Veteran
Messages
4,386
Reaction score
1,308
Points
650
Sin$
0
Released and kinda described methods

Its all in the common I provided, although the coding is bad it works really well.

First game needs a restart!!!

For the HUD's, if your basing the huds on only being called when it's highlighted, that won't fix the HUD issue, but I'm downloading your common now and checking it out.
 
XeXWill

willdebeers

Enthusiast
Messages
892
Reaction score
396
Points
150
Sin$
0
For the HUD's, if your basing the huds on only being called when it's highlighted, that won't fix the HUD issue, but I'm downloading your common now and checking it out.


You will see what I mean when you open the common

The method is only really useful for separating huds when they are on the same X axis.
 
coolbunnymodz

coolbunnymodz

The Original Bunny
Programmer 10th Anniversary Mythical Veteran
Messages
4,386
Reaction score
1,308
Points
650
Sin$
0
You will see what I mean when you open the common

The method is only really useful for separating huds when they are on the same X axis.

Alright if this ever finishes downloading thanks to my miserable internet, I'll see what you mean
 
XeXWill

willdebeers

Enthusiast
Messages
892
Reaction score
396
Points
150
Sin$
0
Just threw it into a folder and ran on PC, boots up fine but when I go to activate the menu, crashes waw

All the button binds are set up for Xbox, which has a nasty habit of crashing the PC game. You will have to open up the patch and change all the xbox buttons to keyboard letters.
 
coolbunnymodz

coolbunnymodz

The Original Bunny
Programmer 10th Anniversary Mythical Veteran
Messages
4,386
Reaction score
1,308
Points
650
Sin$
0
All the button binds are set up for Xbox, which has a nasty habit of crashing the PC game. You will have to open up the patch and change all the xbox buttons to keyboard letters.

Yup just rebooted, scrolling up and down doesn't work but I see what you mean about the HUD's :smile:
 
AoKMiKeY

AoKMiKeY

I am not a man.
Seasoned Veteran Experienced Veteran Grizzled Veteran
Messages
1,844
Reaction score
685
Points
315
Sin$
7
I have just looked through the coding but since the format is killing me would you like to explain on how this more hud works?
 
Mikeeeyy

Mikeeeyy

Member
Modder Programmer Grammar Nazi
Messages
2,176
Reaction score
1,307
Points
485
Sin$
7
Wow, nice thinking Will! Thinking right outside the box with the whole controls things! But one thing that I have thought about is how for clients cmds are delayed. For example in a coop game, only the host can spam the say cmd, for clients you have to wait like a second until it allows you to run it again. This could get annoying for clients when scrolling, just a thought, it may only be for the say cmd, who knows :smile:

Also, thinking even more about the text thing, isn't it going to be a b**** if lets say the middle option is big? Isn't it going to push the left and right text off the screen? Just a thought. This is presuming you center aligned it :smile:
 
D

Deleted member 117745

Reefer Smoker
Messages
2,393
Reaction score
1,924
Points
365
Sin$
0
why all the white characters? you do realize you can skip to the next line using a newline:
Code:
Option 1\nOption 2\nOption 3
pretty basic stuff...
 
Top Bottom
Login
Register