HUD drawing in QuakeC?
Moderator: InsideQC Admins
17 posts
• Page 1 of 2 • 1, 2
HUD drawing in QuakeC?
I'm getting the impression from my searching that the answer is NO, but is there a way to customize the HUD in vanilla Quake 1 via QuakeC?
Even the ability to put up some text strings each frame would be enough.
Even the ability to put up some text strings each frame would be enough.
- Willem
- Posts: 73
- Joined: Wed Jan 23, 2008 10:58 am
Vanilla Quake 1... not clean ways.
You can centerprint a string with just the right number of leading newlines that it appears just above the hud - but that requires knowing their screen resolution. Or you can spam console prints at them, but that only shows on the top four lines on the console (and destroys any other notifications you might send).
There are other perfectly viable methods, just not in vanilla quake 1.
You can centerprint a string with just the right number of leading newlines that it appears just above the hud - but that requires knowing their screen resolution. Or you can spam console prints at them, but that only shows on the top four lines on the console (and destroys any other notifications you might send).
There are other perfectly viable methods, just not in vanilla quake 1.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
As Spike said, centerprint is your method of choice. Look in the tutorial section of this site, and you should soon find a couple about QC menus, which do exactly this. Remember to not spam the centerprints too often if you want it to be playable in multiplayer
I was once a Quake modder
-

Urre - Posts: 1109
- Joined: Fri Nov 05, 2004 2:36 am
- Location: Moon
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
I tried burping but it didn't produce those same results. What is that, a bunch of centerprint'ing or something else?
- Willem
- Posts: 73
- Joined: Wed Jan 23, 2008 10:58 am
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
Willem wrote:I tried burping but it didn't produce those same results. What is that, a bunch of centerprint'ing or something else?
Yes it's centerprint, but not a whole buttload of them.
Look in the Frikbot X source:
http://www.inside3d.com/frikbot/fbx/
If you absolutely must have something more simplified, I suppose I could be persuaded to cough up my code.
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
Like I said earlier, there are tutorials on this site which do what you want.
I was once a Quake modder
-

Urre - Posts: 1109
- Joined: Fri Nov 05, 2004 2:36 am
- Location: Moon
Urre wrote:Like I said earlier, there are tutorials on this site which do what you want.
Bad, bad Urre. Not only is that tutorial incomplete (what pray tell refreshes the menu list when you move out of the trigger? It's not nice to make it so that the player does something unknown when he tries to change weapons) it doesn't cover the vastly more useful multi-string centerprint. (Such as the one in FBX's source, which incidentally comes with a menu system by merit of the waypoint editor)
/me resolves to make a new tutorial to address this issue very soon
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
Willem wrote:Is that vanilla Quake 1? If so, how please.
Actually is pretty simple. Open up defs.qc and add the following line just below the regular centerprint() builtin definition:
- Code: Select all
void(entity client, string s) centerprint = #73; // sprint, but in middle
void(entity client, string s1, string s2, string s3, string s4, string s5, string s6, string s7) centerprint7 = #73;
And BANG, you can do things like you see in the previous screenshot:
- Code: Select all
void () actorShowMenu =
{
centerprint7 (self.owner.enemy, self.owner.killtarget, self.owner.netname, "\n[", self.owner.targetname, "]\n\n", self.owner.message, "");
};
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
Sure, I can jigger up centerprint to put stuff in the middle of the screen but I was looking for something more than that. It evidently doesn't exist. Ahh well.
- Willem
- Posts: 73
- Joined: Wed Jan 23, 2008 10:58 am
17 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest