Toribash
You're missing two end's. One to close the function "jointinfo()" and one to close the "if state == 3" statement.

You also never assign state, you just put the value you want it to be "get_joint_info(0).state" which also needs to be "get_joint_info(0,0).state" as you need to specify which player's joint (0 being tori 1 being uke). So it should be "state = get_joint_info(0,0).state"

Oh and when the joint state is 4 it is relaxed, not when it is 3

Here:
function draw3dfunc()
    x, y, z = get_joint_pos(0, 0)
    set_color(0,0,0,1)
    draw_sphere(x,y,z,0.12)
end

add_hook("draw3d","drawsphere",draw3dfunc)

function jointinfo()
    state = get_joint_info(0,0).state
    if state == 4 then
        echo("Neck is relaxed")
    else 
        echo("Neck isn't relaxed")
    end
end

add_hook("enter_frame","jointstate",jointinfo)
:D
Oh, thank you very much blam. You're awesome and your lua tuts too

So i updated the script, now it tells if the neck is contracted, extended, relaxed or holded every time we enter the editing mod:
function draw3dfunc()
    x, y, z = get_joint_pos(0, 0)
    set_color(0,0,0,1)
    draw_sphere(x,y,z,0.12)
end

add_hook("draw3d","drawsphere",draw3dfunc)

function jointinfo()
    state = get_joint_info(0,0).state
    if state == 4 then
        echo("^32Neck is relaxed")
    elseif state == 3 then
        echo("^04Neck is holded")
    elseif state == 2 then
        echo("^13Neck is contracting")
    elseif state == 1 then
        echo("^02Neck is extending")
    end    
end

add_hook("enter_freeze","jointstate",jointinfo)
+Rep
Ill be needing your help in later scripts
multiple texture uploader! updated: multiple texture remover!
updated pretty colorlist!

<BobJoelZ> ok ive just rebooted my pc and ive tried to activate my reflex on yahoo internet explorer :/ no luck

<Aracoon> I do not enjoy having anal sex with multiple men
/ls unloadscripts.lua
or
go to setup/scripts/unloadscripts.lua or setup/utils/scripts/unloadscripts.lua in tb 3.9
multiple texture uploader! updated: multiple texture remover!
updated pretty colorlist!

<BobJoelZ> ok ive just rebooted my pc and ive tried to activate my reflex on yahoo internet explorer :/ no luck

<Aracoon> I do not enjoy having anal sex with multiple men
He said "upload" not "unload".

To upload click "Manage Attachments" under the post box (you'll have to "go advanced" first), chose which script(s) you want to upload and hit upload .
:D
Oh... i undestood unload... my bad, sorry.
multiple texture uploader! updated: multiple texture remover!
updated pretty colorlist!

<BobJoelZ> ok ive just rebooted my pc and ive tried to activate my reflex on yahoo internet explorer :/ no luck

<Aracoon> I do not enjoy having anal sex with multiple men
function Grips()
grip0 = get_grip_info(0, 11)
set_grip_info(1, 11, grip0)
grip1 = get_grip_info(0, 12)
set_grip_info(1, 12, grip1)
end

add_hook("exit_freeze","mirroruke",Grips)

and

function Grips()
grip0 = get_grip_info(0, 11)
set_grip_info(1, 12, grip0)
grip1 = get_grip_info(0, 12)
set_grip_info(1, 11, grip1)
end

add_hook("exit_freeze","mirroruke",Grips)

I want to add support for grips in my mirror uke script, but this code is not working.
Any help?
multiple texture uploader! updated: multiple texture remover!
updated pretty colorlist!

<BobJoelZ> ok ive just rebooted my pc and ive tried to activate my reflex on yahoo internet explorer :/ no luck

<Aracoon> I do not enjoy having anal sex with multiple men
/legal bump
any help on the post above?
please, i really need.
multiple texture uploader! updated: multiple texture remover!
updated pretty colorlist!

<BobJoelZ> ok ive just rebooted my pc and ive tried to activate my reflex on yahoo internet explorer :/ no luck

<Aracoon> I do not enjoy having anal sex with multiple men
whats the problem if u run it?
qaywer Mongius BlubKill Jaker GerFight Pinheads Coolino <3 | [TEO] | [T3AL] | [HighTunesYT]
i need worldbuilder.lua whe you are able to make 16 objects and i can't find it anywhere.
unfortunately there's no 'script search' thread so i ask here if someone could post this scrpit here?
Last edited by Scorpio; Jul 11, 2010 at 01:07 PM.