Inside3D!
     

New guy alert! Custom key values?

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Willem



Joined: 23 Jan 2008
Posts: 73

PostPosted: Wed Jan 30, 2008 11:23 am    Post subject: New guy alert! Custom key values? Reply with quote

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
View user's profile Send private message Visit poster's website
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Wed Jan 30, 2008 12:18 pm    Post subject: Reply with quote

.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
View user's profile Send private message Visit poster's website
Willem



Joined: 23 Jan 2008
Posts: 73

PostPosted: Wed Jan 30, 2008 1:25 pm    Post subject: Reply with quote

Ahh OK, that makes sense then. Thanks!
_________________
www.wantonhubris.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
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 © 2004 phpBB Group