View previous topic :: View next topic |
Author |
Message |
Nash

Joined: 19 Oct 2007 Posts: 95 Location: Kuala Lumpur, Malaysia
|
Posted: Fri Nov 02, 2007 5:11 am Post subject: |
|
|
Well, all I wanted to do was create a custom HUD and draw some in-game menus for the player inventory.
I'll just attach the stuff to the player's view and make use of DP's EF_NOGUNBOB. This CSQC stuff is way too complicated for me. |
|
Back to top |
|
 |
daemon

Joined: 07 Nov 2007 Posts: 62
|
Posted: Wed Nov 07, 2007 11:41 pm Post subject: |
|
|
CSQC isn't too difficult... it's just that the people who know how to use it don't know how to explain it in an orderly manner. (I probably don't either )
but having said that... where you want to start is in CSQC_UpdateView (hopefully you already have some kind of csqc codebase)
for starters, try messing around in this function by adding some lines after R_RenderScene();
for example:
drawstring('320 240 0', "this is a string", '10 10 0', '1 1 1', 1, 0);
or
drawpic('320 240 0', "image.tga", '32 32 0', '1 1 1', 1, 0); _________________ -daemon [ daemonforge.org ] |
|
Back to top |
|
 |
Nash

Joined: 19 Oct 2007 Posts: 95 Location: Kuala Lumpur, Malaysia
|
Posted: Thu Nov 08, 2007 5:09 am Post subject: |
|
|
daemon wrote: | (hopefully you already have some kind of csqc codebase)
|
No, I don't. The only one available to me, from Nexuiz, is heavily convoluted and not suitable for learning from.
Care to post a clean CSQC base for modders?
Also, I think half of the problem would be solved if someone would be kind enough to give ANY kind of explanation on the parameters for most of the important built-in functions for CSQC. Yes I realize the types are named clearly but it doesn't really tell much IMO. |
|
Back to top |
|
 |
daemon

Joined: 07 Nov 2007 Posts: 62
|
Posted: Sat Nov 10, 2007 7:46 pm Post subject: |
|
|
trying to get ahold of Dresk to see if I can post what he gave me... not really sure yet if i need to get permission first or credit anyone _________________ -daemon [ daemonforge.org ] |
|
Back to top |
|
 |
daemon

Joined: 07 Nov 2007 Posts: 62
|
|
Back to top |
|
 |
Nash

Joined: 19 Oct 2007 Posts: 95 Location: Kuala Lumpur, Malaysia
|
Posted: Sun Nov 11, 2007 1:14 am Post subject: |
|
|
Much appreciated. Thank you.
I'm just wondering though, why is this file so hidden? Had it not been for this forum thread, I don't think it would be possible to ever get a hold of that file, heck no one would even know it exists. |
|
Back to top |
|
 |
daemon

Joined: 07 Nov 2007 Posts: 62
|
Posted: Sun Nov 11, 2007 2:10 am Post subject: |
|
|
I don't think it did exist at all until somewhat recently. _________________ -daemon [ daemonforge.org ] |
|
Back to top |
|
 |
xaGe

Joined: 01 Mar 2006 Posts: 329 Location: Upstate, New York
|
Posted: Sun Nov 11, 2007 4:45 am Post subject: |
|
|
Sweet... |
|
Back to top |
|
 |
Sajt
Joined: 16 Oct 2004 Posts: 1026
|
Posted: Sun Nov 11, 2007 5:25 am Post subject: |
|
|
I'm just looking at it, haven't tried it. In main.qc, the CSQC_Parse_TempEntity() function has a TE_GUNSHOT handler, but doesn't do anything - it just says '//do something cool with TE_GUNSHOT!' This looks like something that will crash unless you comment the TE_GUNSHOT case out, or add code to parse the 3 coords and do something with them. (Since bHandled is true unless the switch hits the default case). _________________ F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe. |
|
Back to top |
|
 |
daemon

Joined: 07 Nov 2007 Posts: 62
|
Posted: Sun Nov 11, 2007 7:41 pm Post subject: |
|
|
You're right. I just tried it and it crashes. That whole lower section of Main.qc is actually not used because of line 50 "#ifdef USE_CSQC_OPTIONALFUNCTIONS", but if you comment that out it will crash when TE_GUNSHOT is called.
I've just commented out those example lines inside CSQC_Parse_TempEntity and reuploaded the zip.
http://www.daemonforge.org/files/source/csqc-scratch.zip _________________ -daemon [ daemonforge.org ] |
|
Back to top |
|
 |
Nash

Joined: 19 Oct 2007 Posts: 95 Location: Kuala Lumpur, Malaysia
|
Posted: Sun Nov 11, 2007 8:22 pm Post subject: |
|
|
Thanks for the fix, daemon! |
|
Back to top |
|
 |
|