Crosshair fun!

Crosshair fun!

Postby DijitaL » 10 May 2012, 03:26

Thought I would share....
My settings: (well most of them)
{l Code}: {l Select All Code}
crosshairsize 0.05
crosshairtex "crosshairs/dijital_base.png"
showclips 0

bind "LSHIFT" [action 7]

fullscreen 1
scr_w 1152
scr_h 864
colorbits 0
depthbits 0
stencilbits 0
fsaa -1
vsync 0
shaders 1
shaderprecision 0
forceglsl 0
soundmono 0
soundchans 32
soundbufferlen 1024
soundfreq 44100
verbose 0


See attached IMG.
It works for me, might not for you :!:
Attachments
dijital_base.png
DijitaL's crosshair
dijital_base.png (5.69 KiB) Viewed 7747 times
User avatar
DijitaL
 
Posts: 11
Joined: 03 May 2012, 21:51
Location: Virginia, USA

MOD IT!

Postby DijitaL » 11 May 2012, 00:51


youtu.be/I9IH8I9kzv8

So far so good.

I am working on a few things, learning Cube 2, RE - etc.
Working GUI for changing inventorytone and chat colors. more to come
I plan on having a nice menu for quite a few vars that I use and want changed in RE.
User avatar
DijitaL
 
Posts: 11
Joined: 03 May 2012, 21:51
Location: Virginia, USA

Re: Crosshair fun!

Postby wowie » 11 May 2012, 03:31

I like it. I sincerely hope this gets developed more. More easy to use GUIs = more people using customization.
I lost the game.
User avatar
wowie
 
Posts: 314
Joined: 15 Mar 2012, 22:22

Re: Crosshair fun!

Postby DijitaL » 11 May 2012, 21:22

Development on this JUST started the other day!

:heart:

So far, your able to change quite a few things:

inventoryammo
inventoryhealth
inventoryimpulse
hudsize
guiblend
chat colors (* and you can still do voice commands and hear them * )
etc etc etc...

I am trying to figure out how to close the menu with the same bind, but that is what trial and error is for.
Attachments
snapshot1.png
User avatar
DijitaL
 
Posts: 11
Joined: 03 May 2012, 21:51
Location: Virginia, USA

Are you paying attention?

Postby DijitaL » 11 May 2012, 22:55

flux.cfg
flux core v1
(2.6 KiB) Downloaded 334 times

Here is a sample....

I am not finished yet, but im itching to get feedback help from you cubescripters. lol

just put flux.cfg in your RE folder next to your autoexec.cfg

Either add
{l Code}: {l Select All Code}
exec flux.cfg
to your autoexec.cfg

or

in game
{l Code}: {l Select All Code}
exec flux.cfg


The menu is bound to the B key.
Press B to cycle thru the different menus.

YOU MUST PRESS CLOSE MENU TO CLOSE THE MENU - glitch/bug
User avatar
DijitaL
 
Posts: 11
Joined: 03 May 2012, 21:51
Location: Virginia, USA

Re: Crosshair fun!

Postby sireus » 11 May 2012, 23:53

DijitaL {l Wrote}:I am trying to figure out how to close the menu with the same bind, but that is what trial and error is for.

{l Code}: {l Select All Code}
bind KEY [ if (cleargui 1) [] [showgui your_gui] ]

or something like that should work.
sireus
 
Posts: 109
Joined: 24 May 2011, 20:10

Re: Crosshair fun!

Postby DijitaL » 12 May 2012, 00:09

That is how I have the bind, it does not close the cycling menu anymore...
I know its something I am missing, just gotta get back to it later and see if I can figure out either a different approach
or an if statement determining if the menu is open or closed....
User avatar
DijitaL
 
Posts: 11
Joined: 03 May 2012, 21:51
Location: Virginia, USA

Re: Crosshair fun!

Postby ZeroKnight » 14 May 2012, 17:01

It would be a lot easier if you grouped the 3 GUI's into one, and separate them with tabs. It may be better this way, as if you were to make it cycling, it would be more tedious to get back to the same menu again and again if you were an end-user trying to test things. Tabs will also give a more clear layout of all the menus available for customization. Even then, you can organize even further by making another GUI, and linking it via button in one of your tabs to make pseudo pop-up windows (the Editing menu utilizes this a lot).
I think it would be a lot more user friendly (not to mention easier to write) if you stuck to tabs, but if you absolutely must have it as cycling, then I could probably help you out with that.

As far as your inclusions go, it's pretty nice! You added quite a few features not many players know about, but are very useful, which is awesome. Navigation needs work of course, so consider the tab layout idea ;)

I actually started a GUI project very similar to this, one that controlled many HUD elements. I sorta forgot about it, but now that I've seen this I might pick it back up again, or if you want, we could even collaborate and make it a 2-man effort :P I've gotten pretty versed with CubeScript, so I could show you a thing or two :) I learned from the best around (looking at you: arand, sireus, srbs, quin ;) )

Anyway, here's the little I had started. There's a complex bit with the sliders. It was a trick myself and srbs (or was it arand? o.O) worked out a while back to use floating point variables in guislider.
{l Code}: {l Select All Code}
//////////////////////////////////////////////////////////////////////////////
/// HUD++: More HUD Configuration!
//////////////////////////////////////////////////////////////////////////////

createrangef = [
    (format "%1_min" $arg1) = (getfvarmin $arg1)
    (format "%1_max" $arg1) = (getfvarmax $arg1)
]

///// Variable Range Storage /////
// These are extra variables that set the range of the included variables
// These are used in a method to trick GUISLIDER into setting floating point
// values, while the slider itself reads a percentage

createrangef hudblend

createrangef inventorysize

createrangef inventoryblend


newgui "HUD++" [ // working title
    guiheader "HUD"
    guititle "Configure HUD Display Options"
    guibar
    guistrut .5
    guifont console [ guitext "Master Settings" ]
    guistrut 1
    guilist [
        guilist [
            guistrut 30 1
            guifont radar [ guitext "HUD Size:" ]
            guislider hudsize 0 (getvarmax hudsize)
        ]
        guistrut 5
        guilist [
            hbvar = (*f $hudblend 100)
            guistrut 30 1
            guifont radar [ guitext "HUD Opacity:" ]
            //guitext $hudblend // testing purposes
            guislider hbvar 0 100 [ hbval = (+f (divf (*f (-f $hudblend_max $hudblend_min) $hbvar) 100) $hudblend_min); hudblend $hbval ]
        ]
    ]
    guilist [
        guilist [
            invsvar = $inventorysize
            guistrut 30 1
            guifont radar [ guitext "Inventory Size:" ]
            //guitext $inventorysize
            guislider invsvar 0 1000 [ invsval = (+f (divf (*f (-f $inventorysize_max $inventorysize_min) $invsvar) 1000) $inventorysize_min); inventorysize $invsval ]
        ]
        guistrut 5
        guilist [
            invbvar = (*f $inventoryblend 100)
            guistrut 30 1
            guifont radar [ guitext "Inventory Opacity:" ]
            //guitext $inventoryblend
            guislider invbvar 0 100 [ invbval = (+f (divf (*f (-f $inventoryblend_max $inventoryblend_min) $invbvar) 100) $inventoryblend_min); inventoryblend $invbval ]
        ]
    ]
    guibar
]


I also used to maintain a Red Eclipse extension, but stopped working on it because only a few people used it, but I made heavy use of compasses, and threw in a few extra features. When I'm on my home computer, I can show you that too if you'd like :) There's probably a lot of good examples in there, since I made it as I learned. (And also a really sweet chat color system with 20 presets and HEX color support ;) )


[EDIT]
I touched up your GUI a bit. I clumped them into one GUI, and each is on it's own tab. I also gave it a little spacing to make it look nicer ;)
{l Code}: {l Select All Code}
// Dijital Dave's Flux GUI | Tabbed
// By: ZeroKnight

newgui flux [
    guinoautotab [
        guiheader "GUI Effects"

        guititle "Inventory Control: "
        guibar
       
        guitext "Impulse Controller"
        guislider inventoryimpulse 0 3
       
        guitext "Weapon Controller"
        guislider inventoryammo 0 4
       
        guitext "Health Controller"
        guislider inventoryhealth 0 3
       
        guistrut 1

        guitext "Inventory Color (RGB colors without spaces)"
        invT = $inventorytone

        guifield invT 12 [inventorytone $invT]

        guistrut 1
       
        guitext "Inventory Size"
        invS = $inventorysize
        guifield invS 4 [inventorysize $invS]
       
        guistrut 1

        guitext "HUD Size"
        guislider hudsize
           

        guitab "Chat Color"
            alias ccolor 0
            guititle "Chat Colors:"
            guibar
            guiradio " 0Green" ccolor 0 [alias ccolor 0]
            guiradio " 1Blue" ccolor 1 [alias ccolor 1]
            guiradio " 2Yellow" ccolor 2 [alias ccolor 2]
            guiradio " 3Red" ccolor 3 [alias ccolor 3]
            guiradio " 4Gray/Grey" ccolor 4 [alias ccolor 4]
            guiradio " 5Purple" ccolor 5 [alias ccolor 5]
            guiradio " 6Orange" ccolor 6 [alias ccolor 6]
            guiradio " 7White (Default)" ccolor 7 [alias ccolor 7]
           
       
        guitab "Extras"
            guititle "Misc Controllers: "
            guibar
            guicheckbox "Full Bright" fullbright
            guicheckbox "Yes, Follow in 3rd!" thirdpersonfollow
            guicheckbox "Yes, Show me my clips!" showclips

            guistrut 1
           
            gBlend = $guiblend
            guilist [
                guitext "GUI Transparency (1-255)  "
                guifield gBlend 3 [guiblend $gBlend]
            ]

            guistrut 1
               
            guicheckbox "Enable Motion Blur" motionblur

            guistrut 1
           
            guitext "Muzzle Flash"
            guislider muzzleflash 0 3

            guistrut 1
           
            guicheckbox "Show Names in Radar" radarplayernames

            guistrut 1
           
            rSize = $radarsize
            guilist [
                guitext "Radar Size (Default 0.065)  "
                guifield rSize 5 [radarsize $rSize]
            ]

            guistrut 1
           
            rDist = $radardist
            guilist [
                guitext "Radar Distance (Default 512)  "
                guifield  rDist 4 [radardist $rDist]
            ]
    ]
]

bind B [showgui flux]
[ Github ][ WazuClan -- irc.wazuclan.com #wazuclan ][ Zero's Archive of RE Extensions, Scripts, WeapMods & More! ]
User avatar
ZeroKnight
 
Posts: 524
Joined: 08 Jun 2011, 01:24
Location: Ohio, United States

Re: Crosshair fun!

Postby DijitaL » 14 May 2012, 23:16

Well I have never done any cubescript at all..
My the tab idea is good, but I could NOT get my radio's to work in the tab. Thus cycle was born haha.

Definatley will look over your scripts and see whats up.

Cycle is not written in stone!
I had a dream the other night bout this script, and thinking bout seeing onrelease for binds, and thought how kool would it be to have a menu where you hold a key for a second, menu pops up, cycles thru, then hold again to close...


I was mainly going over srbs var list in pastebin and seeing which one did what, then would add it in as I went... :?



If you want to collaborate on a nice functioning GUI customizer for RE, Im down. I just kinda do it in my spare time, while I play.

you can hit me up several ways....
User avatar
DijitaL
 
Posts: 11
Joined: 03 May 2012, 21:51
Location: Virginia, USA

Re: Crosshair fun!

Postby ZeroKnight » 15 May 2012, 00:40

Yeah, I know you're just starting out, I'm just letting you know :)
Oh, and I overlooked the bit about your radios. The reason why your radios wont work is because of the line:
{l Code}: {l Select All Code}
alias ccolor 0

You have that written into the actual GUI. GUI's in Red Eclipse refresh their "code" every single frame, as to make everything live and updated. Since you have that line in their, you're resetting the variable each time you change it with the radio button :P
Now, you could put this up at the top outside of the GUI declaration, but then that would end up resetting the user's color every time they launched Red Eclipse.

So, you could just leave it out entirely, and have people store their color of choice in their autoexec...but that wouldn't work for first time users who love to skip instructions ;)
However, we can still use this method, but to avoid breaking the script for those who don't follow instructions, we can create a check and something to default to:
{l Code}: {l Select All Code}
if (> (strlen (getalias ccolor)) 0) [] [ccolor = 7]

What this does is a hackish way of seeing if an alias exists. If the length of it's value isn't greater than 0, then it doesn't exist :P So, if it doesn't, then we will set ccolor to 7 (white). It's a good idea to default it to white, as not everyone wants chat color, and it's better to default to "off".
Then, leave some instructions for people to add a line to their autoexec something like:
{l Code}: {l Select All Code}
alias ccolor #



Lastly, attached are my old Extended Compass scripts. They've got all my fiddlings in them that are beyond the version you can find deep in the bowels of this forum, so you can look through them if you really want. You may be most interested in ChatColors.gui ;)
Oh, and sorry if the code is all messy...hopefully you can read through it ;P Oh, and their may be some parts that reference an external file...I modded the client to write an extra file with the values of aliases, but I'm sure you could figure out what's what. You could probably ignore it for the most part.

[removed]

[EDIT]
Almost forgot: onrelease is hard-coded for only a few controls, ie. moving forward/backward/left/right. You can't specifically use onrelease.
Last edited by ZeroKnight on 06 Oct 2012, 04:33, edited 1 time in total.
[ Github ][ WazuClan -- irc.wazuclan.com #wazuclan ][ Zero's Archive of RE Extensions, Scripts, WeapMods & More! ]
User avatar
ZeroKnight
 
Posts: 524
Joined: 08 Jun 2011, 01:24
Location: Ohio, United States

Re: Crosshair fun!

Postby qreeves » 15 May 2012, 00:57

You can initialise variables by using the follow code layout:

{l Code}: {l Select All Code}
newgui blah [
    <normal gui code>
] [
    if (= $guipasses 0) [
        <stuff you want to happen before the gui loads>
    ]
]
Quinton "quin" Reeves | Lead Developer, Red Eclipse | http://redeclipse.net/ | http://www.facebook.com/redeclipse.net
User avatar
qreeves
 
Posts: 1294
Joined: 17 Mar 2011, 03:46
Location: Queensland, Australia

Re: Crosshair fun!

Postby ZeroKnight » 15 May 2012, 16:04

So that's what guipasses does...I always wondered. Thanks quin! Always the bearer of knowledge :P
[ Github ][ WazuClan -- irc.wazuclan.com #wazuclan ][ Zero's Archive of RE Extensions, Scripts, WeapMods & More! ]
User avatar
ZeroKnight
 
Posts: 524
Joined: 08 Jun 2011, 01:24
Location: Ohio, United States

Re: Crosshair fun!

Postby srbs » 26 May 2012, 22:24

ZeroKnight {l Wrote}:So that's what guipasses does...I always wondered. Thanks quin! Always the bearer of knowledge :P

I think you should start looking in the source code for more help. How are you in the world of C & C++?


EDIT: This reminds me that I should look for source-managed variables to include in my variable lists.
srbs
 
Posts: 94
Joined: 17 Mar 2011, 07:00

Who is online

Users browsing this forum: No registered users and 1 guest