people playing: 284, servers online: 82, games played: 132,146,074 Top Player: Karteiro

  Toribash Community » Toribash » Mods » Lua scripts
Register FAQ Community
Reply
 
Thread Tools Display Modes
Old Mar 27, 2008   #1
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



So you want to learn lua?
This thread will tell you how to start learning lua (seeing as alot of people have been asking).

FIRST STEPS

Firstly, get this program: Notepad++ Notepad++ is a great program for writing lua files, as it has syntax highlighting, along with other great features.

Secondly, set up Notepad++ so it can do more to help you.

Thirdly, i recomend you look at Jok's Tutorial. Its a bit old, but its great for learning the basics.

After that, i recomend you look at other peoples lua scripts on this forum. (any .lua file is openable in notepad and notepad++)

Finally, Look around the SDK for usefull functions and how to use them (toribash/data/scripts/SDK/).

YOUR SECOND SCRIPT
(Assuming you've made the tutorial script)

So after all that I'm sure your eager to create your laz0r firin' uke dismembering cat strangling script. Well go ahead, see what comes out, experiment, learn. But I suggest you start with something simple (like say, a head launcher)

ERRORS

Chances are, your script you made came up with an error, and you have no clue where to look for more info on the error. Well dont fret, there's a file text file called "stderr.txt" that should show you the line your error occured on, and a basic explanation of what went wrong.
Still stuck on the error? Dont know why its happening or how to fix it? Post here and ask someone you know is good at lua (though PM or IRC) to help you with it.

HELPFUL DOCUMENTATION

This thread here contains alot of helpful documentation, and links to that documentation.

TIPS

The best way to teach yourself lua, is by looking at other peoples scripts, and seeing how they work. Stuck for ideas? Go check the "Suggest a script I should make" thread or, ask on IRC for some ideas.

Also, try to Namespace your scripts. This will make it easier to import into other scripts and such

QUESTIONS ABOUT THIS THREAD?

ask here.
:D

Last edited by Blam; Mar 27, 2008 at 07:37 PM..
Blam is offline   Reply With Quote
Old Mar 27, 2008   #2
Jok
Senior Member
 
White Belt
Join Date: Nov 2006



Stickied.
Jok is offline   Reply With Quote
Old Mar 27, 2008   #3
War_Hero
Death awaits me...
 
CUNT CUNT CUNT CUNT CUNT CUNT Belt
Join Date: Jun 2007
Posts: 7,735



Very awesome! I will try some epicz scripting soon ^_^
i have a totally post modern tattoo of a scalene triangle.
<DeadorK> fair maiden
<DeadorK> if the cum is going to be in your mouth
<DeadorK> it shall be in mine as well
War_Hero is offline   Reply With Quote
Old Mar 27, 2008   #4
Tivo
Member
 
Brown Belt
Join Date: Feb 2008
Posts: 292



VERY nice blam! Gonna make a script when i get home lol!
Are you new to Toribash and looking to join a clan? Join [NEWB]
Clan Newb Toribash Thread
ClanNEWB.com
Tivo is offline   Reply With Quote
Old Mar 27, 2008   #5
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



Thanks guys :]

Anything i need to add?
:D
Blam is offline   Reply With Quote
Old Mar 27, 2008   #6
Dafe
Serious Business
 
4th Dan Black Belt
Join Date: Jul 2006
Posts: 618
Clan: bncy



Encourage people to at least try to namespace their scripts for easy importing.
Radioactive torso's description should be, "You have cancer like wow."
Dafe is offline   Reply With Quote
Old Mar 27, 2008   #7
loje
NON-EXISTING!
 
Black Belt
Join Date: Jul 2007
Posts: 3,953



Rly nice man! I gotta try make 1 :P (I even placed this in favourites =D )

+rep

Last edited by loje; Mar 27, 2008 at 10:15 PM..
loje is offline   Reply With Quote
Old Mar 27, 2008   #8
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



Originally Posted by Dafe View Post
Encourage people to at least try to namespace their scripts for easy importing.

Done.
:D
Blam is offline   Reply With Quote
Old Mar 27, 2008   #9
HomerDawkins
The Schwartz is Strong With This One
 
6th Dan Black Belt
Join Date: Oct 2007
Posts: 765
Clan: bncy



Nice Blam, +rep
HomerDawkins is offline   Reply With Quote
Old Mar 27, 2008   #10
Zimpy
Senior Member
 
2nd Dan Black Belt
Join Date: Oct 2007
Posts: 560



I always wanted to make a lua script! +rep
Zimpy 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 08:44 PM.




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