Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: mala15 on November 13, 2015, 02:01:22 pm
Title: Scripting function not in scripting references
Post by: mala15 on November 13, 2015, 02:01:22 pm
Hi,
I've found a function that is not in "scripting reference" or anywhere on the forum when i searched for it. It has been of help to me when trying to solve a few problems so I'll post it here for anyone that don't know about it. I think this comes under "General Help - Scripting"
Anyone else know of "unknown" functions that might be of use? Please post :)
--------------------------------------------------------------------- This function "draws" an infinite line through the coordinates line_point1 and line_point2, and gives back the perpendicular vector from that line to the coordinate target_point. ---------------------------------------------------------------------
I've found this useful a few times, but treyarch have used it to determine if an entity is in front or behind a player or character. In sniper_stealth_logic.gsc on line 257 you can see an example of that, the function is called "entity_is_in_front_of_me( target_entity )".
Title: Re: Scripting function not in scripting references
Post by: MakeCents on November 13, 2015, 02:08:38 pm
what do you mean?:) I didn't intend to memorize names, but look through stuff in those links and find what I'm capable of using^^
Documentation on what the function does, like:
What its purpose Arguments(and their data types) What it returns(data type) Example usage
Data types can be strings, integers, double, Boolean, etc.
Title: Re: Scripting function not in scripting references
Post by: MakeCents on November 13, 2015, 08:25:00 pm
Shenanigans.
You just do this until it works: (https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fstream1.gifsoup.com%2Fview8%2F4632118%2Fidiocracy-iq-test-o.gif&hash=860e961de5c7be3a87ac3ce2cca39509c0883c96)