1. Hello,
    How can I use function which have out arg in JS?
    For example:
    returnHello(string nickname, out hello)

    Regards!
     
  2. LaserHydra,
    I don't mean how to implement out argument to JS.
    I mean how to read output argument from Raycast, actually my bad, but I don't know English so good :D
     
  3. Seems like you just don't need to use any extra parameter for that in JS.
    Taken from the UnityEngine page:
    Unity - Scripting API:
    Code:
    function Update () {
            var fwd = transform.TransformDirection (Vector3.forward);
                    if (Physics.Raycast (transform.position, fwd, 10)) {
                            print ("There is something in front of the object!");
            }
    }
     
  4. Yeah, but I need to get hitInfo :D
     
  5. Works the same.
     
  6. I'll take a look
     
  7. [Solved]?
     
  8. Not really :/
     
  9. Another Example more likely what you wanted:
    Code:
    function FixedUpdate () {
    // Push/turn the object based on arrow key input.
    rb.AddForce(Input.GetAxis("Vertical") * moveForce * transform.forward);
    rb.AddTorque(Input.GetAxis("Horizontal") * rotateTorque * Vector3.up);var hit: RaycastHit;
    var downRay = new Ray(transform.position, -Vector3.up);// Cast a ray straight downwards.
    if (Physics.Raycast(downRay, hit)) {
    // The "error" in height is the difference between the desired height
    // and the height measured by the raycast distance.
    var hoverError = hoverHeight - hit.distance;// Only apply a lifting force if the object is too low (ie, let
    // gravity pull it downward if it is too high).
    if (hoverError > 0) {
    // Subtract the damping from the lifting force and apply it to
    // the rigidbody.
    var upwardSpeed = rb.velocity.y;
    var lift = hoverError * hoverForce - upwardSpeed * hoverDamp;
    rb.AddForce(lift * Vector3.up);
    }
    }
    }
    From Here: Unity - Scripting API:
     
  10. Code:
    [Oxide] 21:47 [Error] Failed to load plugin xxx
    File: xxx.js Line: 1597 Column: 15 Unexpected token ::
    So yeah, it's for UnityEngine, not for Oxide :D
    Well, I'll make C# plugin as API, but it's not solved.
     
  11. Hurtworld is made in Unity, so everything that works in Unity works in plugins (except its located in a blacklisted assembly).
    That code was not supposed to be copy-pasted. It should just give you the solution to your question.
     
  12. But like you can see it's throwing me parse error, so I don't see anyway to get out argument at this moment.