Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Difference between revisions of "DP QC GETTAGINFO"
From Quake Wiki
(New page: Builtin definitions: <pre> float(entity ent, string tagname) gettagindex = #451; vector(entity ent, float tagindex) gettaginfo = #452; </pre> gettagindex returns the number of a tag on an...) |
|||
Line 8: | Line 8: | ||
gettaginfo returns the origin of the tag in worldspace and sets v_forward, v_right, and v_up to the current orientation of the tag in worldspace, this automatically resolves all dependencies (attachments, including viewmodelforclient), this means you could fire a shot from a tag on a gun entity attached to the view for example. | gettaginfo returns the origin of the tag in worldspace and sets v_forward, v_right, and v_up to the current orientation of the tag in worldspace, this automatically resolves all dependencies (attachments, including viewmodelforclient), this means you could fire a shot from a tag on a gun entity attached to the view for example. | ||
+ | [[Category:DarkPlaces]] |
Latest revision as of 02:16, 25 March 2013
Builtin definitions:
float(entity ent, string tagname) gettagindex = #451; vector(entity ent, float tagindex) gettaginfo = #452;
gettagindex returns the number of a tag on an entity, this number is the same as set by setattachment (in the .tag_index field), allowing the qc to save a little cpu time by keeping the number around if it wishes (this could already be done by calling setattachment and saving off the tag_index).
gettaginfo returns the origin of the tag in worldspace and sets v_forward, v_right, and v_up to the current orientation of the tag in worldspace, this automatically resolves all dependencies (attachments, including viewmodelforclient), this means you could fire a shot from a tag on a gun entity attached to the view for example.