FuhQuake Forum Index FuhQuake
https://fuhquake.net
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

request: Qc feature for text positioning

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    FuhQuake Forum Index -> General ChitChat
View previous topic :: View next topic  
Author Message
EasyTarget



Joined: 08 Nov 2003
Posts: 28

PostPosted: Fri Jan 16, 2004 3:27 am    Post subject: request: Qc feature for text positioning Reply with quote

Hi
i would like to see some way to be able to decide a
texts X and Y position values from QuakeC code(sprint for ex.).
this would make it easy for modmakers to make additional
HUD elements and ive heard that it isnt so hard to put that feature
into the engine.

the reason im asking about this and dont just learn how to do it myself is
that i dont want my little mod to need an own client Razz .


//EasyTarget
Back to top
View user's profile Send private message
b



Joined: 28 Jan 2003
Posts: 215

PostPosted: Fri Jan 16, 2004 12:04 pm    Post subject: Reply with quote

its not that hard to do already, look at tf's sbar_on etc
Back to top
View user's profile Send private message
Mercury



Joined: 06 Oct 2002
Posts: 140
Location: Adelaide, Australia

PostPosted: Fri Jan 16, 2004 6:51 pm    Post subject: Reply with quote

b obviously u havent seen any tf source, because tf's sbar prints are made up of around 11 to 80 line breaks depending on the res. This means there is a repeat of "\n\n\n\n\n\n" many times which makes up the menu. The menu is then looped every frame so its alot of linebreaks per frame thus Sounds dodgy.

Unfortunately because the feature in which easytarget has requested does not exist, its the only way it can be done in qc code. I may look at inserting this feature in my ozmvdsv client but the problem still remains of the server or mod not knowing what res the client is in.
_________________
New Oz TeamFortress mod

http://ap.qgl.org/mercury/
Back to top
View user's profile Send private message MSN Messenger
b



Joined: 28 Jan 2003
Posts: 215

PostPosted: Fri Jan 16, 2004 8:21 pm    Post subject: Reply with quote

i certainly do know how it works and was only proposing it as a temp. solution
Back to top
View user's profile Send private message
EasyTarget



Joined: 08 Nov 2003
Posts: 28

PostPosted: Sat Jan 17, 2004 9:34 am    Post subject: Reply with quote

Thanks for the help Smile
that tf centerprint stuff works great ,atleast on 640x480 hehe.
Back to top
View user's profile Send private message
b



Joined: 28 Jan 2003
Posts: 215

PostPosted: Sat Jan 17, 2004 11:52 am    Post subject: Reply with quote

Smile
Back to top
View user's profile Send private message
Spike



Joined: 19 Apr 2003
Posts: 144

PostPosted: Sun Jan 18, 2004 8:23 am    Post subject: Reply with quote

Using the backspace char you can hijack the last line on peoples consoles...

Many people may consider this antisocial though. For you people I appologise for ever bringing it up.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
EasyTarget



Joined: 08 Nov 2003
Posts: 28

PostPosted: Sun Jan 18, 2004 9:59 am    Post subject: Reply with quote

Centerprint doesnt work as good as i want it to, it seems like it have
limitation for newbies so some strings doesnt get printed.

i need to print out like +10 different strings to get out all the information
i want in the same print since i cant have multiple centerprints Sad

its also hard to get the text to the left side of the screen Sad

it would still be nice with a more advanced sprint

Spike: hmm.. what would that be good for Smile?
Back to top
View user's profile Send private message
Spike



Joined: 19 Apr 2003
Posts: 144

PostPosted: Sun Jan 18, 2004 5:31 pm    Post subject: Reply with quote

if you do a load of localcmds using the localinfo command, using loats of calls to ftos or whatever, you can combine a huge string however you want.
The catch is that you are required to wait until the next frame for the server to have executed the message. This doesn't mean wait next player frame, no that would be too simple. Instead you'll need to create an entity timer to do it.
You can retrieve the string to send with infokey.

This method works okay for 50 or so strings but tends to be awkward to do for more than one player/group at a time.

Alternativly, I hope you know about the whole centerprint7(entity e, string s1, string s2, string s4, string s5, string s6, string s7) = #73;


The console thing is a way of getting to the notification on the console. The downside is that you either end up stuffing 4 lines every frame, you get flickering about every 3 secs, or you fill the console buffer by a stupid ammount. So, probably not useful... But hey, it's good to know your options.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Massa



Joined: 19 Sep 2002
Posts: 196
Location: Germany

PostPosted: Sat Jan 31, 2004 7:25 pm    Post subject: Reply with quote

I think the available centerprint function would be O.K. for centered messages.
I would need a similar function which aligns the string to the left or right of the screen.

But what's really missing is the possibility to concat strings! Sad
If I want to print out status information I'm always fucked up with the restriction that I cannot combine several strings.

Or is there a way I do not know???

So what's really needed are string functions for QC like sprintf, strcat and so on...
Would be really great to "print" something into another string instead of putting it on the screen...

Couldn't we do something with fuh's extension system?
Back to top
View user's profile Send private message
fuh
Almighty King


Joined: 07 Sep 2002
Posts: 2086

PostPosted: Sat Jan 31, 2004 10:55 pm    Post subject: Reply with quote

//string(string s1, string s2) strcat = #115

check pr_cmds.c for more .
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    FuhQuake Forum Index -> General ChitChat All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

hosted by ausgamers