people playing: 94, servers online: 30, games played: 133,399,950 Top Player: Snook

  Toribash Community » Toribash » Mods » Lua scripts
Register FAQ General Rules Community
Reply
 
Thread Tools Display Modes
Old Feb 25, 2009   #21
Blam
Now I know my abc's!
This user title is the property of SkulFuk.
 
4th Dan Black Belt
Join Date: Apr 2007
Posts: 5,506
Clan: bncy



Code:
function hideUke()
    run_cmd("opt uke 0")
    for i = 0,20 do
        if(i ~= 20) then
            x,y,z = get_joint_pos(1,i)
            set_joint_pos (1, i, x-100, y-100, z+100)
        end
        temp = get_body_info(1,i).pos
        set_body_pos(1,i,temp.x-100,temp.y-100,temp.z+100)
    end
end

hideUke()

add_hook("new_game","",
    function()
        hideUke()
    end
)

add_hook("camera","",
    function()
        x,y,z = get_joint_pos(0,3)
        set_camera_lookat(x, y, z)
        return 1
    end
)
like this?
:D
Blam is offline   Reply With Quote
Old Feb 25, 2009   #22
Tapion
thumbing through the bands I be playin' with the check, keep it real 'til I die, put it on my set
 
4th Dan Black Belt
Join Date: Jul 2008
Posts: 2,366
Clan: Sigma



I'm gonna start at these tutorials as soon as I can. It's wierd I didn't notice this thread before now.
Sigma | Gata
Tapion is offline   Reply With Quote
Old Feb 28, 2009   #23
matejk
NON-EXISTING!
 
3rd Dan Black Belt
Join Date: Feb 2009
Posts: 21



-snip-

User infracted for referral spam.
matejk is offline   Reply With Quote
Old Feb 28, 2009   #24
jafem
Member
 
4th Dan Black Belt
Join Date: Feb 2008
Posts: 85



How do i make these lua tutorials pleace i realy got to now how to do them.If i now then i should lern all toribash games play good
View my artwork here: Deviant Art
jafem is offline   Reply With Quote
Old Feb 28, 2009   #25
imbanned
NON-EXISTING!
 
Green Belt
Join Date: Feb 2009



why this isnt sticky?

I will try that when i have time
imbanned is offline   Reply With Quote
Old Mar 3, 2009   #26
deady
Chatterbox
 
5th Dan Black Belt
Join Date: Mar 2008
Posts: 5,731



ooo, just found this. Thanks, this is something I have always wanted to try and learn.
Organisation of Awesome: Member.
deady is offline   Reply With Quote
Old Mar 25, 2009   #27
BlakNWyte
NON-EXISTING!
 
10th Dan Black Belt
Join Date: Dec 2007
Posts: 2,706



Nice tutorial. I'm a somewhat newb programmer and it's cool to see how this is so related to java, my only fluent language.
BlakNWyte is offline   Reply With Quote
Old Mar 25, 2009   #28
Dafe
Serious Business
 
4th Dan Black Belt
Join Date: Jul 2006
Posts: 618
Clan: bncy



I was unaware Lua was anything like Java.
Radioactive torso's description should be, "You have cancer like wow."
Dafe is offline   Reply With Quote
Old Mar 31, 2009   #29
karouvirae
NON-EXISTING!
 
Black Belt
Join Date: Mar 2009
Posts: 1



Hi!
Thanks for the great tutorials, I love them. They're my starting point for lua scripting =D

I found an error, though.
On Tutorial three the second code-box says:
Code:
function winning()
Player1_Score = get_player_info(1).injury
Player2_Score = get_player_info(0).injury
if(Player1_Score > Player2_Score) then
return "Player 1"
elseif(Player2_Score > Player1_Score) then
return "Player 2"
else
return "Draw!"
end
end

echo("Winning: ^06" .. winning())
The if and the elseif-clauses were supposed to have "greater-than"-characters, I believe. However, it only shows as HTML (>).

Awesome tutorials nonetheless =D
Can't wait to continue reading
karouvirae is offline   Reply With Quote
Old Mar 31, 2009   #30
Blam
Now I know my abc's!
This user title is the property of SkulFuk.
 
4th Dan Black Belt
Join Date: Apr 2007
Posts: 5,506
Clan: bncy



Fixed it, thanks for pointing it out.

I guess I had better release some newer ones soon..
:D
Blam is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:42 AM.




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
ragdoll fighting game physics fighting game ragdoll fighting physics funmotion joints martial arts karate pc mac free game turn based game