Toribash
Originally Posted by david91520 View Post
How get opener Judo ? when i will be play Toribash Scripts Judo Mods and Aikido

What?
Signature temporarily out of order.
Originally Posted by box View Post
There are a few commands that run_cmd is not allowed to execute, and that's the only reason I can imagine it not working.

add all vip commands to this list, for some stupid reason.
<~suomynona> TITS OR ELEELETH
draw__text(string text, number pos_x, number pos_y [, integer font_type])
How does the integer font_type thingy work? I understand that it changes font, and I can get the font I want, but how does it work?
Also, any way to change text size?
Last edited by IceColor; Jul 28, 2014 at 10:53 PM.
Fukin spice and wolf
There are three fonts in Toribash and I don't think you can add any. It works like this:
draw_text("FONTS.BIG = 0", 5, 100, FONTS.BIG)
draw_text("FONTS.SMALL = 1", 5, 155, FONTS.SMALL)
draw_text("FONTS.MEDIUM = 2", 5, 170, FONTS.MEDIUM)
and looks like this:


You could use the number values directly like this:
draw_text("FONTS.BIG = 0", 5, 100, 0)
draw_text("FONTS.SMALL = 1", 5, 155, 1)
draw_text("FONTS.MEDIUM = 2", 5, 170, 2)
But I think you can read the code better if you use the names.

Also you can't change font size.

To use your own font you could create image textures for every character and then use load_texture() and draw_quad() to draw the text. I'm not sure but I don't think you can resize those either.

If you want a resizeable font you could create your own vector-like font by using draw_quad(), draw_triangle(), etc. to create letters and then scale the coordinates.
Signature temporarily out of order.
how can i make a script that can get a 7 charactors string from the console?(or other input source?)

i'd like to use some commands, and they are all 7 chars long(can't be shorter), i'm new to this version of lua so i'm wondering if i can use some command to let the script receive a string in game?


thanks to anybody who would kindly answer me in advance!
There's a command hook that exactly does that. It works like this:

-- write a function that parses and handles your commands
local function handleCommand(cmd)
    if cmd == "test123" then
        -- handle command test123
        return 1
    elseif cmd == "othercm" then
        -- handle command othercm
        return 1
    elseif ...

    end
end

-- register hook (tell the game you want to handle commands)
add_hook("command", "my command handler", handleCommand)
This assumes all your commands are exactly seven characters long and don't have any arguments.

The "return 1" is there so that Toribash doesn't try to handle your custom commands (which would result in an "unkown command" errror message).
Signature temporarily out of order.
thats so great, thanks a lot!!


[QUOTE=psycore;7503132]There's a command hook that exactly does that. It works like this:
-----


and another question.. what is the state 2 of grip_info?

i tested it and see something wierd.

when i use set_grip_info(0,BODYPARTS.L_HAND,1) and set... (....,2), and i saw both the commands make the tori grip left hand. didn't see any difference.

however, when i look into some rpl files, i find sometimes it record grip status 2 to stand for the player who DIDN'T grip!

so i'm totally confused, is that state 2 for grip? or not grip? ??

and why there are actually only two status of hands(grip/not), but there are 3 numbers(0,1,2)

and i didn't find anything on that from bing or google, so would u or anybody pls help me answer it?
Last edited by wayto; Aug 2, 2014 at 06:56 AM. Reason: <24 hour edit/bump
0 sets to not gripping, everything else sets to gripping. I don't know why sometimes there's a 2 in the replay files and I especially don't know why it means "don't grip". Doesn't make much sense to me but that's the way it is.
Signature temporarily out of order.
well, in set_grip, i guess 2 is for grip.

but in replays, when u see some "GRIP 0; 2 1", u always find the player0 didn't grip his left hand when u acutally play the rpl in game..

that's totally weird. and i decided to see 2 as 0 in my private replay reader....

thanks anyway psycore~