PDA

View Full Version : Displaying / hiding HUD graphics with FS ???


Rellik_jmd
October 1st, 2002, 10:31 AM
Here's what the doc's say:

int createpic(string lumpname, int x, int y, int draw, int trans, fixed priority)

Creates a new heads-up pic using the lump 'lumpname', which must be a standard DOOM-format screen graphic, at unscaled screen coordinates (x, y), which may range from 0 to 319 and from 0 to 199 respectively. If draw is non-zero, the pic will be drawn to the screen, and if trans is non-zero, the pic will be drawn translucent. priority determines how the pic will draw in relation to any other existing heads-up pics spawned by FraggleScript -- it will draw over any pics with a lower priority number, and under any pics with a higher priority number. Note that FraggleScript heads-up pics always have lower priority than any native heads-up graphics, such as the player HUD.

Heads-up pics are valid for the duration of the level in which they were created, and will be saved in savegames. This function returns an integer value which can be used as a handle to track and later manipulate this particular heads-up pic. You should always capture the handle unless you never intend to change or hide the pic after creating it. There is not currently any method for creating different heads-up pics on a particular player's screen.[/]

void setpicvisible(int handle, int visible)

[i]Modifies the visibility of the FS heads-up pic with this handle. Set visible to a non-zero value to have the pic drawn, and set it to zero to hide it.

So how do I display a graphic (GFX1) and then be able to remove it by another script? What's with all the stuff about handles? Help! Please show the exact lines of script.

http://forums.newdoom.com/UBB/smile.gif

------------------
Member of Team DEIM (http://www.teamdeim.com/)
Webmaster The DOOM Editing Resource (http://www.teamdeim.com/der/)

Team Deim.com is TEMPORARILY down. It will be back, maybe in a week or two, but it will be back! DOOM Editing Resource temporary site. (http://www.telusplanet.net/public/daewoo/der/)

DarkWolf
October 1st, 2002, 11:59 AM
If it's like map objects it should be like this:
<BLOCKQUOTE><font size="1" face="Trebuchet MS, Arial, Helvetica, serif">code:</font><hr width="100%" size="1" noshade><pre>
[scripts]

int hudpic1;

script 1
{
hudpic1 = createpic(blah, blah, blah);
setpicvisible(hudpic1, 0); //hide the pic
}
</pre><hr width="100%" size="1" noshade></BLOCKQUOTE>

I think that's right...

------------------
-DarkWolf
Scientia et mors
http://www.boomspeed.com/darkwolf/darksmall.gif

Rellik_jmd
October 1st, 2002, 07:23 PM
Cool! Thanks man! I'll give that a try. http://forums.newdoom.com/UBB/smile.gif

------------------
Member of Team DEIM (http://www.teamdeim.com/)
Webmaster The DOOM Editing Resource (http://www.teamdeim.com/der/)

Team Deim.com is TEMPORARILY down. It will be back, maybe in a week or two, but it will be back! DOOM Editing Resource temporary site. (http://www.telusplanet.net/public/daewoo/der/)

Rellik_jmd
October 1st, 2002, 08:02 PM
Its still not working, what gives? Please help!

Here's what I got:

int hudpic1;

script 30
{
hudpic1 = createpic(gfx1, 20, 20, 1, 0, 1);
wait(400);
setpicvisible(gfx1, 0); //hide the pic
}

------------------
Member of Team DEIM (http://www.teamdeim.com/)
Webmaster The DOOM Editing Resource (http://www.teamdeim.com/der/)

Team Deim.com is TEMPORARILY down. It will be back, maybe in a week or two, but it will be back! DOOM Editing Resource temporary site. (http://www.telusplanet.net/public/daewoo/der/)

Aliotroph?
October 1st, 2002, 10:21 PM
Try setting the visibility to true right after you create it. Maybe that's the trick.

------------------
Aliotroph?.postCount++;

MR_ROCKET
October 2nd, 2002, 06:03 AM
good luck rellik http://forums.newdoom.com/UBB/smile.gif, that sound neat if it turns out right ?

Rellik_jmd
October 2nd, 2002, 07:01 AM
No luck yet, it says 30, 3: NO SUCH FUNCTION: 'CREATEPIC'

------------------
Member of Team DEIM (http://www.teamdeim.com/)
Webmaster The DOOM Editing Resource (http://www.teamdeim.com/der/)

Team Deim.com is TEMPORARILY down. It will be back, maybe in a week or two, but it will be back! DOOM Editing Resource temporary site. (http://www.telusplanet.net/public/daewoo/der/)

DarkWolf
October 2nd, 2002, 11:30 AM
That usually happens with functions not implemented in Legacy. http://forums.newdoom.com/UBB/smilies/cwm36.gif

------------------
-DarkWolf
Scientia et mors
http://www.boomspeed.com/darkwolf/darksmall.gif

Rellik_jmd
October 3rd, 2002, 11:12 PM
So any chance these will be fixed anytime soon? Legacy guys? Any of ya coders lurkin?

------------------
Member of Team DEIM (http://www.teamdeim.com/)
Webmaster The DOOM Editing Resource (http://www.teamdeim.com/der/)

Team Deim.com is TEMPORARILY down. It will be back, maybe in a week or two, but it will be back! DOOM Editing Resource temporary site. (http://www.telusplanet.net/public/daewoo/der/)

Aliotroph?
October 3rd, 2002, 11:15 PM
Too bad those don't work. Legacy seems to be short on FS coders at the moment.

/me wishes he knew how to work this FS coding stuff.

------------------
Aliotroph?.postCount++;

DarkWolf
October 4th, 2002, 11:51 AM
Today I was pondering in the school library about the snow thing. I suppose I'll give it a try later this evening.

------------------
-DarkWolf
Scientia et mors
http://www.boomspeed.com/darkwolf/darksmall.gif

Hurdler
October 5th, 2002, 06:01 AM
working with FS stuffs is really easy. I added those math functions in less then 30 mins, and I didn't know much about FS implementation.

Ok, I'll see why it's not working. If it's in the doc, then it should work, otherwise it's a bug (or I've forgotten to put "Not yet implemented" in the docs).

------------------
Member of the DooM Legacy Team

Exl
October 5th, 2002, 06:25 AM
I tried to do some things with Legacy's FS code just a while ago, but MSVC wouldn't load the project file. It gives no error messages and loads no files at all. Any help? I might be able to do something with FS although I don't have that much C skills.

------------------
I don't think, I know.
Then again, I don't know much...

Doom_Dude
October 5th, 2002, 06:38 AM
<BLOCKQUOTE><font size="1" face="Trebuchet MS, Arial, Helvetica, serif">quote:</font><hr width="100%" size="1" noshade><font face="Trebuchet MS, Arial, Helvetica, serif" size="2">Today I was pondering in the school library about the snow thing. I suppose I'll give it a try later this evening.</font><hr width="100%" size="1" noshade></BLOCKQUOTE>

Sounds cool. I could use some snow. http://forums.newdoom.com/UBB/biggrin.gif

------------------
http://www.newdoom.com/hosted/themegawad/sig/vilesig1.GIF
The Megawad: Home of Vilecore (http://www.newdoom.com/hosted/themegawad/)

People will believe what they want to believe, no matter what the truth is....
------------------------
Sometimes it's not easy following the path of least resistance.

Rellik_jmd
October 5th, 2002, 07:35 AM
If you could get those commands working I'd be a very happy camper. I've been tinkering with stuff that I think people will be able to do some very cool things with, but it really needs HUD graphics. I'll try to get a demo out soon.

------------------
Member of Team DEIM (http://www.teamdeim.com/)
Webmaster The DOOM Editing Resource (http://www.teamdeim.com/der/)

Team Deim.com is TEMPORARILY down. It will be back, maybe in a week or two, but it will be back! DOOM Editing Resource temporary site. (http://www.telusplanet.net/public/daewoo/der/)

Aliotroph?
October 6th, 2002, 04:05 AM
I suppose if you were good at keeping tabs on mobjs in the map you could use those HUD graphics to make a motion tracker thing like in those Alien vs. Predator games. Now THAT would be a complex script. Huge piles of math in there to get the distance and direction and then draw it to the HUD and continually update it.

------------------
Aliotroph?.postCount++;

Planky
October 6th, 2002, 06:27 PM
Would it be possible with fs to make the HUD graphics translucent?

------------------
http://pages.quicksilver.net.nz/barnes-ea/Planky.gif
Who is General Failure and why is he reading my hard disk?

Doom_Dude
October 6th, 2002, 07:14 PM
<BLOCKQUOTE><font size="1" face="Trebuchet MS, Arial, Helvetica, serif">quote:</font><hr width="100%" size="1" noshade><font face="Trebuchet MS, Arial, Helvetica, serif" size="2">Would it be possible with fs to make the HUD graphics translucent?</font><hr width="100%" size="1" noshade></BLOCKQUOTE>

/me drools http://forums.newdoom.com/UBB/biggrin.gif

------------------
http://www.newdoom.com/hosted/themegawad/sig/vilesig1.GIF
The Megawad: Home of Vilecore (http://www.newdoom.com/hosted/themegawad/)

People will believe what they want to believe, no matter what the truth is....
------------------------
Sometimes it's not easy following the path of least resistance.

Rellik_jmd
October 6th, 2002, 08:09 PM
In theory you could make HUD graphics translucent (as there is a FS command thingy for doing that) but I don't think this applies to stuf like the Statusbar. Man that would be totally cool to be able to have a translucent statusbar. http://forums.newdoom.com/UBB/smile.gif

------------------
Member of Team DEIM (http://www.teamdeim.com/)
Webmaster The DOOM Editing Resource (http://www.teamdeim.com/der/)

Team Deim.com is TEMPORARILY down. It will be back, maybe in a week or two, but it will be back! DOOM Editing Resource temporary site. (http://www.telusplanet.net/public/daewoo/der/)

Planky
October 6th, 2002, 08:31 PM
I wasnt so worried about the status bar (as I usually just have the minimal amount of stats on screen, as in frags, health ammo left, etc) but yes it would be cool

------------------
http://pages.quicksilver.net.nz/barnes-ea/Planky.gif
Who is General Failure and why is he reading my hard disk?

Hurdler
October 7th, 2002, 10:09 AM
OK, translucent HUD will be possible in the next release (maybe with a cvar so that can be set in in the and using FS). Quite easy to do, I think, maybe also in software mode (but limited, like translucent 3d-floors)

------------------
Member of the DooM Legacy Team

Aliotroph?
October 7th, 2002, 05:50 PM
Nifty. http://forums.newdoom.com/UBB/smilies/cwm17.gif

------------------
Aliotroph?.postCount++;