Toribash
Original Post
[Solved] Quick Question
So yoyo made this amazing codeCode code:
local state = {}
local selected_player = get_world_state().selected_player

add_hook("exit_freeze","y_ostt",
function()
selected_player = get_world_state().selected_player
for i = 0,19 do
state[i] = get_joint_info(selected_player,i).state
end
end
)

add_hook("key_down","y_ostt",
function(k)
if k==104 then
selected_player = get_world_state().selected_player
for i = 0,19 do
set_joint_state(selected_player,i,state[i])
end
end
end
)

echo("state_backup.lua by yoyo.")
echo("press h to load the state from your last turn.")
echo("make sure to always have your player selected, especially at the end of a turn and when loading a state.")

and I want to use it. But where do I put it exactly?
My signature was too long so I got this pretty rainbow here instead now. Isn't it nice? This is a nice rainbow.

Risk did this to me and I hate him forever, please join the official "Fuck Risk in the Ass With a Live Bat" social group to join me in hating Risk:
Click here to join my cult to fuck Risk in the ass with a live bat
How do I save it as a .lua?

It's been a while lol
My signature was too long so I got this pretty rainbow here instead now. Isn't it nice? This is a nice rainbow.

Risk did this to me and I hate him forever, please join the official "Fuck Risk in the Ass With a Live Bat" social group to join me in hating Risk:
Click here to join my cult to fuck Risk in the ass with a live bat