Forum

> > CS2D > General > Lua scripting tutorial
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch Lua scripting tutorial

51 Antworten
Seite
Zum Anfang Vorherige 1 2 3 Nächste Zum Anfang

alt Re: Lua scripting tutorial

ohaz
User Off Offline

Zitieren
lol, I won't translate it in more than 2 languages. If you can't read the english text, you need to learn english, the english I use is not the hardest. A video about scripting doesn't really help, if you have to write something, you won't learn it by watching a video.
Perhaps I'll translate it to german later, but english is more important, because most cs2d players can't speak german, but most can speak english
@wups: Yeah thx, I'll use that

alt Re: Lua scripting tutorial

Night Till Death
User Off Offline

Zitieren
Great just great.....Lua is going down to hell..........NVM (screw lua).....the all who dont know lua will have to do maps on their own thx a lot!

alt Re: Lua scripting tutorial

wups
User Off Offline

Zitieren
Why not learn english?
Why should TKD translate to other language too, because of you cant english?

alt Re: Lua scripting tutorial

ohaz
User Off Offline

Zitieren
perhaps the cause why I'm not translating it into russia is, that I can't speak russia.

wups, I'm now using your colour code, the clearness is better now, thank you!

alt Re: Lua scripting tutorial

horus
User Off Offline

Zitieren
It stands out so much better now! ^-^
Zitat
-- I just explain every little peace, on after another:

This bit has bothered me quite a bit...
@NTD: If you can understand this, then it should be relatively easy for you to understand the tutorial. Everything is a bit simplified for us beginners. ^-^

alt Re: Lua scripting tutorial

Zune5
COMMUNITY BANNED Off Offline

Zitieren
NTD hat geschrieben
noo.....im not the only russian person who playes cs2d! many russians play it! and the y dont even understand LUA OR ENGLISH!


Can you please stop arguing?
He's not going to translate it, into some random language.
Most players who play this game can't speak English well, and do fine making their own lua scripts.
But others do speak English pretty well, and do fine too.
Your English is good enough, so just read and learn

alt Re: Lua scripting tutorial

Lee
Moderator Off Offline

Zitieren
TheKilledDeath hat geschrieben
Would be a pleasure to work together with you
About the webdesign. The tutorial is currently just a *.html file, nothing more. So the only real way to make a design is with css and frames?


No frames, just leave the design to me, I've done a few freelancing jobs so I'm pretty confident about this.

alt Re: Lua scripting tutorial

wups
User Off Offline

Zitieren
TKD, waiting for a good array guide too.
I'm really stuck on arrays and don't know how to start or end. :p

alt Re: Lua scripting tutorial

ohaz
User Off Offline

Zitieren
oh well, an array is easy, perhaps i should just add some lines..
1
array = {firstentry, secondentry, thirdentry,...}
the only thing which is different to normal variables is the {} around it and the , between 2 values.
Just leave out the , after the last value.
to fetch out a value of an array use:
array[number] . where number is the number of the entry.
so array[3] would give out : "thirdentry"

alt Re: Lua scripting tutorial

sonnenschein
User Off Offline

Zitieren
TheKilledDeath hat geschrieben
oh well, an array is easy, perhaps i should just add some lines..
1
array = {firstentry, secondentry, thirdentry,...}
the only thing which is different to normal variables is the {} around it and the , between 2 values.
Just leave out the , after the last value.
to fetch out a value of an array use:
array[number] . where number is the number of the entry.
so array[3] would give out : "thirdentry"

OMFG I KNOW ARRAYS
this is gonna help me alot

EDIT: i've made a test, and it worked WOO.
1
2
3
4
5
6
7
8
9
10
11
12
13
myarray = {"How are you","Im good tnx!","OMFG YOUR GOOD WTF?"}


addhook("say","array_test")
function array_test(id,txt)
	if (txt =="!test1") then
		msg(myarray[1])
	elseif (txt =="!test2") then
		msg(myarray[2])
	elseif (txt =="!test3") then
		msg(myarray[3])
	end
end
2× editiert, zuletzt 25.06.09 18:31:16

alt Re: Lua scripting tutorial

Fub4r
User Off Offline

Zitieren
My friend told the lua scripting is for noobs and i won't know how it work...
I really don't understand that,but i think lua scripts are helping us...
Can someone give me a good reasons for him that isn't a noob work?

alt Re: Lua scripting tutorial

ohaz
User Off Offline

Zitieren
Lua isn't very hard, perhaps that's why your friend says that it's noob work. But in fact you can also make very complicated scripts with Lua, so it's not nooby at all
edit:
I began to work on the "finding bugs" part (which is pretty extensive I think...)
1× editiert, zuletzt 28.06.09 07:39:02

alt Re: Lua scripting tutorial

Fub4r
User Off Offline

Zitieren
When i show blazzingxx hero lua script he shut up...
But i still know he think Cs 1.6. is better than 2d...

Eh... I can't make any lua
I tried to make only joining message and it don't work...
i think i wouldn't script anymore...
I can only make good maps
Maybe i would later know how to make easy script...

Regards,

Maciej (Fub4r)

alt Re: Lua scripting tutorial

SQ
Moderator Off Offline

Zitieren
Fub4r hat geschrieben
When i show blazzingxx hero lua script he shut up...
Maciej (Fub4r)

My script isnt so special you think
Its still not done in my eyes.
If your friend think thats hard. Then dont believe him.

First you should try to use DC samples for begining.
cs2d_dir/sys/lua/samples/

alt Re: Lua scripting tutorial

younes
COMMUNITY BANNED Off Offline

Zitieren
Fub4r hat geschrieben
When i show blazzingxx hero lua script he shut up...
But i still know he think Cs 1.6. is better than 2d...

Eh... I can't make any lua
I tried to make only joining message and it don't work...
i think i wouldn't script anymore...
I can only make good maps
Maybe i would later know how to make easy script...

Regards,

Maciej (Fub4r)

don't care ,only people who love cs2d like it others don't, all of my friends think it's stupid but i really don't give a shit about that,and also,i sucked at lua,now i'm ok,thats all coz i downloaded a few scripts from us,and read them modified them learned from them and then i got use to lua , but it still is little hard...

alt Re: Lua scripting tutorial

Fub4r
User Off Offline

Zitieren
You got right i don't have to hear what he say but i still tried to make scripts and they don't work... i think i would left scripting and g back to map makin!

alt Re: Lua scripting tutorial

horus
User Off Offline

Zitieren
You don't need Lua if you've got the right map-making skills.
Unfortunately, I don't have those... so I'll try to learn some Lua.

alt Re: Lua scripting tutorial

Fub4r
User Off Offline

Zitieren
But map don't be the same like good lua...
In Lua you can script "bad word = kick" in map nope...
Hope you see the diffrence...
I tried to use DC samples... And they not work in my scripts...
I just think i'm too noob for scripts
1× editiert, zuletzt 03.07.09 12:39:02
Zum Anfang Vorherige 1 2 3 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht