This library contains a custom function that returns the unit that the player is currently looking at in accordance to their Yaw and Pitch (or no unit, if no valid units are in their line of sight).
This traceline function reduces the computational load exponentially in comparison to a conventional traceline. Although this is intended for FPS style games or camera modes, if you have decent mathematical and scripting skills, you can easily convert the function for TPS use instead.
The term "Quadratic Regression" is referring to a polynomial approximation of a set of points. This is used in order to greatly increase the accuracy of the traceline depending on the distance from the Target to the Player. For more information on this, go here:
Don't forget to check out the images that are attached.
----------------------------------
This library also contains two triggers and a couple of variables and a record. You will need these in order to achieve the overall effect. Read the attached comments to know why you need these.
In the attached map, the folder: TraceLibrary contains all of the triggers/functions/variables/records that you'll need to import into your map.
YOU MUST READ THE BELOW INFORMATION: ---------
YOU MUST READ THE BELOW INFORMATION: ---------
YOU MUST READ THE BELOW INFORMATION: ---------
In the traceline function itself, if there is no valid unit in your line of sight, it will create a dummy unit to shoot at. In this library, that dummy unit is a Mutalisk. In order to change this, go to the VERY END of the function where it says "Create 1 Mutalisk for Player 0..." and change this to your dummy unit (make it an invisible unit). These dummy units are deleted within 1.00 seconds of their creation by the main trigger that utilizes the trace function.
You will have to create your own FPS camera, your own FPS unit, and your own units that shoot at the tracetarget. You will have to look at the variables in the Record and set them appropriately (Avatar = Your Player's Unit).
If you want more than 6 player using the traceline, you will have to increase the arraysize of the Record Variable and the bounds of the Pick Each Integer Loop in the main trigger.
Whichever weapon is being fired at the TraceTarget, this weapon's range must be greater than or equal to 75. You can control the operational max range of the weapon using the Trace function itself.
Hello,
This library contains a custom function that returns the unit that the player is currently looking at in accordance to their Yaw and Pitch (or no unit, if no valid units are in their line of sight).
This traceline function reduces the computational load exponentially in comparison to a conventional traceline. Although this is intended for FPS style games or camera modes, if you have decent mathematical and scripting skills, you can easily convert the function for TPS use instead.
The term "Quadratic Regression" is referring to a polynomial approximation of a set of points. This is used in order to greatly increase the accuracy of the traceline depending on the distance from the Target to the Player. For more information on this, go here:
http://www.sc2mapster.com/forums/development/triggers/45700-tutorial-quadratic-regression-3d-traceline/
Don't forget to check out the images that are attached.
----------------------------------This library also contains two triggers and a couple of variables and a record. You will need these in order to achieve the overall effect. Read the attached comments to know why you need these.
In the attached map, the folder: TraceLibrary contains all of the triggers/functions/variables/records that you'll need to import into your map.
YOU MUST READ THE BELOW INFORMATION:
---------YOU MUST READ THE BELOW INFORMATION:
---------YOU MUST READ THE BELOW INFORMATION:
---------In the traceline function itself, if there is no valid unit in your line of sight, it will create a dummy unit to shoot at. In this library, that dummy unit is a Mutalisk. In order to change this, go to the VERY END of the function where it says "Create 1 Mutalisk for Player 0..." and change this to your dummy unit (make it an invisible unit). These dummy units are deleted within 1.00 seconds of their creation by the main trigger that utilizes the trace function.
You will have to create your own FPS camera, your own FPS unit, and your own units that shoot at the tracetarget. You will have to look at the variables in the Record and set them appropriately (Avatar = Your Player's Unit).
If you want more than 6 player using the traceline, you will have to increase the arraysize of the Record Variable and the bounds of the Pick Each Integer Loop in the main trigger.
Whichever weapon is being fired at the TraceTarget, this weapon's range must be greater than or equal to 75. You can control the operational max range of the weapon using the Trace function itself.