Hitscan: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
hitscan <x1> <y1> <z1> <sect1> <cos of ang> <sin of ang> <zvel> <hit sector return var> <hit wall return var> <hit sprite return var> <hit x return var> <hit y return var> <hit z return var> <clip mask>
hitscan <x1> <y1> <z1> <sect1> <cos of ang> <sin of ang> <zvel> <hit sector return var> <hit wall return var> <hit sprite return var> <hit x return var> <hit y return var> <hit z return var> <clip mask>


Hitscan returns values of what would be hit if one travelled forward in a straight line from a set of coordinates at a certain angle.
Hitscan returns the values of what would be hit if one travelled forward in a straight line from a set of coordinates at a specified angle.


All parameters are [[gamevar | gamevars]].  The first three are the coordinates from which the hitscan occurs, followed by the scanning sector.  The [[cos]], then the [[sin]] of an angle (typically the [[ang]] of the actor performing the scan) come next, followed by the z angle, which must be calculated before the hitscan.  The six return gamevars hold the values of what the hitscan hits.  The value of clip mask tells hitscan which sorts of things it can hit.  A clip mask of 4294901808 is useful for most purposes.
All parameters are [[gamevar | gamevars]].  The first three are the coordinates from which the hitscan occurs, followed by the scanning sector.  The [[cos]], then the [[sin]] of an angle (typically the [[ang]] of the actor performing the scan) come next, followed by the z angle, which must be calculated before the hitscan.  The six return gamevars hold the values of what the hitscan hits.  The value of clip mask tells hitscan which sorts of things it can hit.  A clip mask of 4294901808 is useful for most purposes.

Revision as of 12:25, 15 May 2006

hitscan <x1> <y1> <z1> <sect1> <cos of ang> <sin of ang> <zvel> <hit sector return var> <hit wall return var> <hit sprite return var> <hit x return var> <hit y return var> <hit z return var> <clip mask>

Hitscan returns the values of what would be hit if one travelled forward in a straight line from a set of coordinates at a specified angle.

All parameters are gamevars. The first three are the coordinates from which the hitscan occurs, followed by the scanning sector. The cos, then the sin of an angle (typically the ang of the actor performing the scan) come next, followed by the z angle, which must be calculated before the hitscan. The six return gamevars hold the values of what the hitscan hits. The value of clip mask tells hitscan which sorts of things it can hit. A clip mask of 4294901808 is useful for most purposes.