Ranking
Oh I see.
EDIT: With the new modding funtions, I forgot about Lua :P Any new functions with the new release? I'm too unbored to look it up myself.
Last edited by Nuyashaki; May 6, 2008 at 06:40 PM.
whats wrong with this function, i know i went wrong with my maths somewhere, but im not too sure where >.>
function get_angle(x1,y1,x2,y2)
    angle = math.atan2(x1-x2,y1-y2)
    return angle
end
:D
Originally Posted by Juntalis View Post
Wouldn't it be x2-x1, y2-y1?

not necessarily. He might want it x1-x2.


Th problem might be the variable names. you might be subtracting 2x. like 1(x) - 2(x)
i have a totally post modern tattoo of a scalene triangle.
<DeadorK> fair maiden
<DeadorK> if the cum is going to be in your mouth
<DeadorK> it shall be in mine as well
Wouldnt make that much of a difference (i could just times it by -1).

It seems to return a way too small
:D
Originally Posted by War_Hero View Post
not necessarily. He might want it x1-x2.


Th problem might be the variable names. you might be subtracting 2x. like 1(x) - 2(x)

No.

Any self-respecting programming language only multiplies on *. Algebra is obviously not self-respecting.
Squad Squad Squad lead?
The standardization of Toribash Squad roles may have gone too far!
I found this in the punchout script.
--get_angle:  Checks angle between any 2 joints [player1] [joint1] [player2] [joint2] around any axis [around: AROUND.X  AROUND.Y  AROUND.Z] and returns in degrees.
function get_angle(player1, joint1, player2, joint2, around)

    local d1, d2
    local j_pos1 = { }
    local j_pos2 = { }
    j_pos1['x'], j_pos1['y'], j_pos1['z'] = get_joint_pos(player1, joint1)
    j_pos2['x'], j_pos2['y'], j_pos2['z'] = get_joint_pos(player2, joint2)
    
    if around == AROUND.X then 
        d1 = j_pos2.z - j_pos1.z
        d2 = j_pos2.y - j_pos1.y
    end
    if around == AROUND.Y then 
        d1 = j_pos2.z - j_pos1.z
        d2 = j_pos2.x - j_pos1.x
    end
    if around == AROUND.Z then 
        d1 = j_pos2.y - j_pos1.y
        d2 = j_pos2.x - j_pos1.x
    end
    
    local angle = math.deg( math.atan2(d1,d2) )
    return angle

end
when i put a script i get off the forums in my script folder i go onto toribash click setup then scripts and it is not there. why is this?
Movie.lua
Hey, not sure if this is exactly the place to post this, but my movie.lua script isn't working. When i run it, it creates the frames, but doesnt convert them into a video. Its easy enough to convert them myself, but it would be nice if the movie script would do it for me. Anyone help?

G