CATEGORY NAME: MATH & VECTOR FUNCTIONS Vector::dot(Vector1, Vector2); ARG: Vector1: Is a Vector that has an X, Y and Z value."100 32 3" Vector2: Is a Vector that has an X, Y and Z value."34 77 45" EXPLAIN: Will perform the dot product on the two vectors. USED IN: Item.cs RETURN: Float. The dot product. If failed then 0. Vector::add(Vector1, Vector2); ARG: Vector1: Is a Vector that has an X, Y and Z value."100 32 3" Vector2: Is a Vector that has an X, Y and Z value."34 77 45" EXPLAIN: Will add the two vectors together. USED IN: Currently not used in any script files. RETURN: Vector. Example: "134 169 48". If failed then "0 0 0". Vector::sub(Vector1, Vector2); ARG: Vector1: Is a Vector that has an X, Y and Z value."100 32 3" Vector2: Is a Vector that has an X, Y and Z value."34 77 45" EXPLAIN: Will subtract the two vectors. USED IN: Currently not used in any script files. RETURN: Vector. Example: "66 -45 -42". If failed then "0 0 0". Vector::neg(Vector); ARG: Vector: Is a Vector that has an X, Y and Z value."100 32 3" EXPLAIN: Will make the Vector values all negative. For example: Vector = "56 34 23"; Answer = Vector::neg(Vector); Answer is equal to "-56 -34 -23". USED IN: Currently not used in any script files. RETURN: Vector. Example: "-56 -34 -23". If failed then "0 0 0" Vector::getFromRot(Rotation, [Length, Zvalue]); ARG: Rotation: Rotation of an object. Length: Length of desired vector. Zvalue: Will increase the vector in the Z direction. EXPLAIN: Is used to create a vector in the direction of the rotation passed in. If no length is passed then the vector will be the unit length. This is most commonly used to get a vector in the direction an object is facing. For example: Rotation = GameBase::GetRotation(Player); Length = 50; Zvalue = 60; Vector = Vector::getFromRot(Rotation, Length, Zvalue); Vector is equal to a vector facing in the direction the player was at an upward angle. The upward angle is due to the Zvalue passed in. Now you can us a function called Player::applyImpulse(Player, Vector); This will force the player forward at a force of Length and up in the air a force of Zvalue USED IN: Ai.cs, Item.cs, Vehicle.cs RETURN: Vector. Example: "394 44 43". If failed then "0 0 0". Vector::getDistance(Vector1 or Pos, Vector2 or Pos); ARG: Vector1: Is a Vector that has an X, Y and Z value."100 32 3" Vector2: Is a Vector that has an X, Y and Z value."34 77 45" Pos: Position. Is an X, Y, Z point. "28 25 99". EXPLAIN: Is used to find the distance between two vectors or points. USED IN: Ai.cs, Objectives.cs RETURN: Float. Distance. If failed then 0. Vector::getRotation(NVector); ARG: NVector: Normalized vector. Example: "1 0 -1" EXPLAIN: Used to get a rotation from a normalized vector. USED IN: Item.cs RETURN: Rotation in radians. Example: "-1.5 0 3.14". Vector::normalize(Vector); ARG: Vector: Is a Vector that has an X, Y and Z value."100 32 3" EXPLAIN: Will normalize the vector passed in. USED IN: Staticshape.cs RETURN: Vector. Normalized Vector. If failed then "0 0 0". sqrt(Value); ARG: Value is a non negative number. EXPLAIN: Used to take the square root of the value passed in. USED IN: Vehicle.cs RETURN: Float. The square root of the input value. If failed then -1. pow(Value, Power); ARG: Value: Integer. Power: Integer. EXPLAIN: Will raise the Value to the given Power. USED IN: Currently not used in any script files. RETURN: Float. If failed then -1.