Re: Need some guidance on a common bit of syntax
Tip: "SceneMan" is the shortened name of "SceneManager".
Also, I'm not completely sure how to use the FindAltitude function. You're better off casting a StrengthRay downwards.
wiki wrote:
CastStrengthRay
Traces along a vector and shows where along that ray there is an encounter with a pixel of a material with strength more than or equal to a specific value.
Arguments:
-The starting position.
-The vector to trace along.
-The strength value of screen any found to be equal or more than will terminate the ray.
-A reference to the vector screen will be filled out with the absolute location of the found terrain pixel of less than or equal to above strength.
-For every pixel checked along the line, how many to skip between them for optimization reasons. 0 = every pixel is checked.
-A material ID to ignore, IN ADDITION to Air.
-Whetehr the ray should wrap around the scene if it crosses a seam.
Return value:
Whether a material of equal or more strength was found along the ray. If not, the fourth parameter have been set to last position of the ray.
How to read the wiki:
Name of function
What this function does
Arguments - the things that go into the parantheses
Return Value - What the function spits back out at you. If you set a variable equal to a function, the variable will equal whatever the function spat out.
Specific break-down of CastStrengthRay arguments (ini modding knowledge required)
-Where this "ray" starts (Vector)
-What direction to draw the line and how long to draw it (Vector)
-The material with this strength value will stop this ray (number)
-How many pixels to skip scanning. If this is set to five, only the sixth pixel after will be checked (number)
-What material the ray should ignore. Materials are identified by their ID index number (number)
-If the map wraps, should the ray wrap across the map too? (boolean)