View previous topic :: View next topic |
Author |
Message |
Willem
Joined: 23 Jan 2008 Posts: 73
|
Posted: Wed Jan 30, 2008 11:23 am Post subject: New guy alert! Custom key values? |
|
|
This is probably obvious but here goes...
I'm getting my feet wet in QuakeC lately and I'm wondering if it's possible to read custom key/values from the entity? Like if I define a custom combo:
"mykey" "123"
Can I get that value out somehow when I'm in QuakeC? What is the function call I would use? _________________ www.wantonhubris.com |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Wed Jan 30, 2008 12:18 pm Post subject: |
|
|
.float mykey;
then read mykey to find out what the mapper stored in it.
At load time the engine looks for the field with that name and stores its value into it. Its just a regular field.
Don't create too many special fields for every single different sort of entity because the field takes memory for every single entity (in dp thats up to 4*32767=128kb of memory per new field). Also don't make the names too long because qbsp has entity segment limits too (depends on the compiler). _________________ What's a signature? |
|
Back to top |
|
 |
Willem
Joined: 23 Jan 2008 Posts: 73
|
Posted: Wed Jan 30, 2008 1:25 pm Post subject: |
|
|
Ahh OK, that makes sense then. Thanks! _________________ www.wantonhubris.com |
|
Back to top |
|
 |
|