Call of Duty 5: World at War => Downloadable Items for Mappers => Custom Maps, Mods & Tools => Scripts => Topic started by: alaurenc9 on July 27, 2015, 12:47:10 am
Title: Scrolling Fullscreen Overlay Hud
Post by: alaurenc9 on July 27, 2015, 12:47:10 am
Hey guys, today I have something I guess is cool and worth posting. This is something I needed for my mod so I spent like 3 hours scripting and testing it, and since it's not a big deal I might as well show people because I find it to have benefits, even though alot of people are probably not gonna give two shits about this post. Anyway here it is,
Fullscreen Overlay HUD
Basically this allows you to have an overlay on your screen, scrolling up or down it at a speed you choose. I needed this especially for Vulture Aid, and I thought I could release it and see what other people could use it for.
Copy this code and call it _xS78_overlay.gsc:
There is no init or anything to call, this script can just remain idle until you are ready to use it.
How To Use This:
Setting Up The Shader - First you need to get your overlay shader, any shader works, but obviously use one that is meant for being displayed fullscreen, with a pattern and nothing specific ( thats what this whole thing is for, fullscreen overlays ). The material settings need to be the same as a normal on screen shader ( like perk hud or something ), and they are not precached in this script, you need to precace it seperately in the script yourself.
Using This In Script - Using this in script has been made really simple, all you do is say weather to apply or remove the overlay shader. To apply a shader, call this in your script where ever: Now lets look at the arguments passed in:
Shader - the name of the material you want to use as the overlay, also what is used to sort the overlays seperately, like a way to specify a single overlay
Priority - The priority of this overlay showing up over the others. Basically you are able to apply multiple overlay's at once, and basically it only shows the overlay with the highest priority.
Scroll Time - The time it takes for the hud to completely move down or up your screen in one cycle, basically increases\decreases the speed of the overlay.
Alpha - The alpha ( visibility ) of the overlay ( i think we all know what this means ).
Direction - The direction the overlay scrolls ( you can only put one of two things: "up" or "down", and the overlay will move in that direction.
You can re-apply the settings, basically meaning you can call that function again with the same shader, and you can add new settings to the overlay. Each setting has been scripted to update properly while its scrolling ( which was the hardest thing to do honestly ).
When it's time do be done with the overlay, you can easily remove it. basically just call this: Just call this with the shader you want to be removed, and it will remove. Once removed, it will apply the overlay with the next highest priority number ( if the one you removed had the highest priority number ). If you don't have any overlay's applied, no overlays will show up ( duh ).
And thats pretty much it, I hope this becomes useful to some people :P
One note that people should know: this does use two HUD elems to properly display the scrolling overlay, keep that in mind if you have a setup that is on the verge of hitting the HUD limit.
Title: Re: Scrolling Fullscreen Overlay Hud
Post by: DidUknowiPwn on July 27, 2015, 12:59:45 am
This would be so much easier in menu file ._.
Title: Re: Scrolling Fullscreen Overlay Hud
Post by: ibounce on July 27, 2015, 01:26:15 am
Any chance you could post some images or a video?
Title: Re: Scrolling Fullscreen Overlay Hud
Post by: Harry Bo21 on July 27, 2015, 01:48:29 am
its literally a full screen size hud elem moving of the screen in a certain direction if im reading this right
Imagine the lightning you get on your screen when you teleport in Der Reise, but imagine it moving upwards or sideways or something, I think thats what this is basically. Not sure though, havent read it fully
Title: Re: Scrolling Fullscreen Overlay Hud
Post by: ibounce on July 27, 2015, 01:55:14 am
its literally a full screen size hud elem moving of the screen in a certain direction if im reading this right
Imagine the lightning you get on your screen when you teleport in Der Reise, but imagine it moving upwards or sideways or something, I think thats what this is basically. Not sure though, havent read it fully
Ahhh, gotcha. It's credits. :troll:
Title: Re: Scrolling Fullscreen Overlay Hud
Post by: Harry Bo21 on July 27, 2015, 02:06:16 am
its literally a full screen size hud elem moving of the screen in a certain direction if im reading this right
Imagine the lightning you get on your screen when you teleport in Der Reise, but imagine it moving upwards or sideways or something, I think thats what this is basically. Not sure though, havent read it fully
it looks like the vulture aid green overlay thing that scrolls up your screen basically, except this comes with more: u can add different speeds, different directions, differenct alpha, especially how you can change those settings while its active and it updates without notice. And also you can apply multiple ones at one time, and use the highest priority thing. Its really good for if you don't want to end up with two overlays at once and you want one that dominates the others.
it looks like the vulture aid green overlay thing that scrolls up your screen basically, except this comes with more: u can add different speeds, different directions, differenct alpha, especially how you can change those settings while its active and it updates without notice. And also you can apply multiple ones at one time, and use the highest priority thing. Its really good for if you don't want to end up with two overlays at once and you want one that dominates the others.
I mean I guess but the thing is it keeps like scrolling the same pic so you would see the same text over and over and over, so no don't do that.
menu files don't offer this much without any script, so yea
Title: Re: Scrolling Fullscreen Overlay Hud
Post by: Harry Bo21 on July 27, 2015, 04:09:29 am
No I understand you can make a fullscreen scrolling overlay, but this does more, im talking about how this script is able to handle the entire overlay system, all the settings and all the things it does. Menufile just creates the hud, and then you have to manage showing it and setting it up which would be harder than this is.