Originally Posted by
yoyo2009
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?
--grips
player = {}
player[0]={}
player[1]={}
for i=0, 1 do
for n=0,1 do
player[i][n] = 0
end
end
function main2d()
set_color(0, 0, 0, 1)
draw_text("Tori: " .. player[0][0] .. ", " .. player[0][1], 100, 100)
draw_text("Uke: " .. player[1][0] .. ", " .. player[1][1], 100, 120)
end
function grips()
for i=0, 1 do
for n=0,1 do
player[i][n] = get_grip_info(i, n+11)
end
end
end
add_hook("draw2d","draw",main2d)
add_hook("exit_freeze","grips",grips)
It's an array with joint states for tori and uke. player[0][0] is tori's right hand, player[1][1] is uke's left hand.
You'll probably want to change the name of the array to grip or something though.
Last edited by War_Hero; Jul 12, 2010 at 03:26 AM.