Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Alternative Hud Fading

Author
Message
Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 7th May 2012 05:11
There's something thats been frustrating me for years with FPSC. That is the way HUD's fade out. I do not like the fact that they always fade out moving up. Is there any way to prevent this? I just simply want a HUD to fade out not move at all - is this possible?

Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 7th May 2012 05:22
Teabone, have you tried the fpgcrawtext command? It's fairly simple to use and I think give way better results than typical hud.
Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 7th May 2012 05:43 Edited at: 7th May 2012 05:51
Any way to fade image huds without them scrolling up?

How do you fade crawl text?

Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 7th May 2012 07:01 Edited at: 7th May 2012 07:01
IT's pretty simple.

YOu can search it out.

in a nut shell instead of the typical hudimagefine line in the script.

you use a line like this



CHeck out this link for more info.
http://forum.thegamecreators.com/?m=forum_view&t=171157&b=23
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 7th May 2012 10:34
it is possible, but requires a lot of row-scripting so you have to write each step of fading by hand using etimer. so when you want to get a smooth fade over 3 seconds, you need about 20-30 lines of fadecommands. ched80 has done a script like this for me a time ago, i will search for it and give you a sample if no one answers in time.

Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 7th May 2012 15:20
maho - did i not give you the updated version of this? it doesn't need so many lines any more and is far more flexible.

maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 7th May 2012 16:54 Edited at: 7th May 2012 17:09
yes you do, but out of MY view this is still a big script.

and yes, i know it isnt for you, my scriptmonster.^^


hope its ok to give away the basics here as this isnt really complex in syntax?

:state=0:hudreset,hudx=50,hudy=70,hudimage=languagebank\english\gamecore\text\lockeddoor.dds,hudname=S01H01,hudhide=1,hudmake=display

;START

:state=0:state=1
:state=1,plrwithinzone=1:hudshow=S01H01,incstate=1
:state=2:incstate=1,etimerstart

:state=3,etimergreater=100:changehudalpha=S01H01 250,incstate=1
:state=4,etimergreater=200:changehudalpha=S01H01 240,incstate=1
:state=5,etimergreater=300:changehudalpha=S01H01 230,incstate=1
:state=6,etimergreater=400:changehudalpha=S01H01 220,incstate=1
...
state=x:state=1

these are the basic lines after you start the etimer and show the hud. depends on you how many miliseconds the etimer runs, and the smoother the fade should be, the more lines you have to create.

thanks please adress to Ched80.

gz

Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 7th May 2012 20:00
I will have to disagree with Maho on this ine. Though he is a vast wealth of knowledge and has provide me with help in my times of need. He is right it is script intensive, depending on what you want it to do, however to me anyway it seems alot easier than having to use editing software to create your hud. Then go back and edit the path to pull up the desired hud. and I totally agree with the hud fade that is why I tried the fpgcrawtext to begin with.

I have found with the crawtext, when I need a hud I can pull up notepad in the map editor and write the script on the fly.

Now in no way am I claiming to be when it comes to scripting or anything else with FPSC for that matter. At the end of the day your going to end up writting a script. At the very least give fpgcrawtext a try and see what you think.
Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 8th May 2012 02:41
I'm more interested in the hud command mainly because I'm using images not text. To be clear im not using images as text... I'm usual actual graphical icons and such like pictures of objects you have to collect visible on the screen at all times.

Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 8th May 2012 03:29
@maho76 so basically I have to fade out the overall alpha channel of a HUD in increments using the etimer command? I'll give that a whirl, though I was really hoping for a simple way of going about this. Be nice if a new command could be hard coded to FPSC itself to allow for a simple fade without movement. But that's been my wishful thinking for years lol

@Troutflies I don't usually use crawltext because i have no control over the strokes around each letters. I was hoping there would be a way to disable them or at least change their size (the black outline around the text). But above all, the inability to fade them.

Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 8th May 2012 03:42 Edited at: 8th May 2012 03:47
@maho76 your code worked great! Rather than doing a complete smooth fade I used the following values which still worked out pretty good:



Decreased by 50 each round still created an okay fade without having to create 255 or so lines of degradations. I added HUDFADEOUT at the end which gets rid of the hud after it is not visible.

I guess this threat will be useful for anyone using the search engine for this type of script. Thanks again all

maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 8th May 2012 10:18
so again thanks to ched80 for this.

very usefull for graphics-huds, while troutflies is right, use rawtextfade for text is way easier.

Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 8th May 2012 21:45
Now this is how the forums should be. Different opinions, points of view, and it's ok. Everyone involved trying to help another member a fellow brother in arms to be cheesy.

I didn't realize you wanted to use an image hud. I'd heed Maho's advice.

What application will the hud appear in? Is the character doing something that triggers the hud? Is he close to the item.

Because you could very easliy attach a script to a tzone that will call up that or any other hud when a key is pressed. and will continue to do so wherever you are in the level.

Not sure if that will be of any help just thought Id mention it.
Teabone
Valued Member
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Canada
Posted: 9th May 2012 21:16
Yes the forums are a great help. Look at my "Joined" date lol

Login to post a reply

Server time is: 2024-11-27 18:05:51
Your offset time is: 2024-11-27 18:05:51