View previous topic :: View next topic |
Author |
Message |
EasyTarget
Joined: 08 Nov 2003
Posts: 28
|
Posted: Fri Jan 16, 2004 3:27 am Post subject: request: Qc feature for text positioning |
|
|
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 .
//EasyTarget |
|
Back to top |
|
|
b
Joined: 28 Jan 2003
Posts: 215
|
Posted: Fri Jan 16, 2004 12:04 pm Post subject: |
|
|
its not that hard to do already, look at tf's sbar_on etc |
|
Back to top |
|
|
Mercury
Joined: 06 Oct 2002
Posts: 140
Location: Adelaide, Australia
|
Posted: Fri Jan 16, 2004 6:51 pm Post subject: |
|
|
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 |
|
|
b
Joined: 28 Jan 2003
Posts: 215
|
Posted: Fri Jan 16, 2004 8:21 pm Post subject: |
|
|
i certainly do know how it works and was only proposing it as a temp. solution |
|
Back to top |
|
|
EasyTarget
Joined: 08 Nov 2003
Posts: 28
|
Posted: Sat Jan 17, 2004 9:34 am Post subject: |
|
|
Thanks for the help
that tf centerprint stuff works great ,atleast on 640x480 hehe. |
|
Back to top |
|
|
b
Joined: 28 Jan 2003
Posts: 215
|
Posted: Sat Jan 17, 2004 11:52 am Post subject: |
|
|
|
|
Back to top |
|
|
Spike
Joined: 19 Apr 2003
Posts: 144
|
Posted: Sun Jan 18, 2004 8:23 am Post subject: |
|
|
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 |
|
|
EasyTarget
Joined: 08 Nov 2003
Posts: 28
|
Posted: Sun Jan 18, 2004 9:59 am Post subject: |
|
|
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
its also hard to get the text to the left side of the screen
it would still be nice with a more advanced sprint
Spike: hmm.. what would that be good for ? |
|
Back to top |
|
|
Spike
Joined: 19 Apr 2003
Posts: 144
|
Posted: Sun Jan 18, 2004 5:31 pm Post subject: |
|
|
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 |
|
|
Massa
Joined: 19 Sep 2002
Posts: 196
Location: Germany
|
Posted: Sat Jan 31, 2004 7:25 pm Post subject: |
|
|
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!
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 |
|
|
fuh
Almighty King
Joined: 07 Sep 2002
Posts: 2086
|
Posted: Sat Jan 31, 2004 10:55 pm Post subject: |
|
|
//string(string s1, string s2) strcat = #115
check pr_cmds.c for more . |
|
Back to top |
|
|
|