HTOTM: FUSION
Okay, so I've been studying a bit of lua since the first few questions I've asked, but heres 2 things I gotta ask.
1. How do I make a functional button like that in worldbuilder.(not just a square, but like a button that darkens when the mouse scrolls over it)
2. I get how to make a function start with a key press (the whole 'if key == # then' trick), but how do I get that to start with a ./ec phrase? For example I think this was a script by Psycore called Jump2Frame or something like that where you had to do "/ec jump <frame#>" and the replay did /opt for everything and paused it for you at the inserted frame. I've also noticed this line in that script
lua code:
if tonumber(TORIBASH_VERSION) > 3.9 then
add_hook("command", "jumpTo", function(cmd) if cmd:sub(0,4) == "jump" then jumpTo(tonumber(cmd:sub(6))) return 1 end end)
echo("Usage: /jump <frame>")
else
add_hook("console", "jumpTo", function(cmd, i) if cmd:sub(0,4) == "jump" then jumpTo(tonumber(cmd:sub(6))) return 1 end end)
echo("Usage: /ec jump <frame>")
end

I'm guessing that has something to do with how I do the phrase thing I was asking before. Someone mind to explain this for me thanks.