Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Editing DP QC ENTITYDATA
From Quake Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 17: | Line 17: | ||
</pre> | </pre> | ||
− | DP_QC_ENTITYDATA provides versatile functions intended for storing | + | DP_QC_ENTITYDATA provides versatile functions intended for storing data from specific entities between level changes, but can be customized for some kind of partial savegame. |
− | + | WARNING: .entity fields cannot be saved and restored between map loads as they will leave dangling pointers. | |
− | + | numentityfields returns the number of entity fields. NOT offsets. Vectors comprise 4 fields: v, v_x, v_y and v_z. | |
− | + | entityfieldname returns the name as a string, eg. "origin" or "classname" or whatever. | |
− | + | entityfieldtype returns a value that the constants represent, but the field may be of another type in more exotic progs.dat formats or compilers. | |
− | + | getentityfieldstring returns data as would be written to a savegame, eg... "0.05" (float), "0 0 1" (vector), or "Hello World!" (string). Function names can also be returned. | |
− | + | putentityfieldstring puts the data returned by getentityfieldstring back into the entity. | |
− |