Originally Posted by
Nuyashaki
Well thanks Jok, I just use cheat engine. That's where all my knowledge of hexidecimals came from.
Also, I'd like to note that before Lua, I had no programing experience what so ever, so let me ask a few things:
1. Does a hook basically tell a function when to run? Like new_game would start on a new game?
2. Can you list all the current hooks?
3. What does this mean
for k = 0, 1 do
for i=0, 19 do
I dont understand it what so ever.
1. Yes.
2. List from Toribash 3.2:
"new_game"
"new_mp_game"
"enter_frame"
"end_game"
"leave_game"
"enter_freeze"
"exit_freeze"
"key_up"
"key_down"
"mouse_button_up"
"mouse_button_down"
"mouse_move"
"player_select"
"joint_select"
"draw2d",
"draw3d"
"play"
"camera"
"console"
3. That makes 2 loops. Ill make an example of how to use it for you
for k = 0, 1 do -- Do this twice (0 to 1 = 2 times) First with k being 0, then with it being 1.
for i=0, 19 do -- Do this 20 times. With i going from 0 to 19
echo(k .. " : " .. i) -- Echos k and i.
end -- Ends the second for
end -- Ends the first for
That will make 38 echos. First it will go through i equaling 0,19 with k equaling 0, then it will go through with k being 1.
The loop you specified is normally used to get joint data for both the tori and the uke, like so:
JointInfo = { } -- This sets up a new array
for k = 0, 1 do -- Do this twice for each player
JointInfo[k+1] = { } -- We use k+1 as tables shouldnt use [0].
for i=0, 19 do -- Do this 20 times for each joint
JointInfo[k+1][i+1] = get_joint_info(k,i) -- Inserts the joint info into the JointInfo[k+1][i+1] table.
end -- Ends first for
end -- Ends second for