Forum

> > CS2D > General > CS2D Lua Scripting Tutorial Development
Forums overviewCS2D overviewGeneral overviewLog in to reply

English CS2D Lua Scripting Tutorial Development

74 replies
Page
To the start Previous 1 2 3 4 Next To the start

old Re: CS2D Lua Scripting Tutorial Development

Flacko
User Off Offline

Quote
- Dark Void - has written
This will be useful but why do we need tutorial we have an official tutorial that explains everything just go to www.lua.org

Yes, but the lua manual doesn't teach you to "program" it assumes you know the basics about programming, variables, functions, arrays, strings, pointers, OOP, etc.
edited 1×, last 11.12.09 11:06:44 pm

old Re: CS2D Lua Scripting Tutorial Development

SQ
Moderator Off Offline

Quote
@TheKilledDeath
Yes, you can. Thanks for help.
Problem is not a code, but that I have to write explanations.

@- Dark Void -,
This tutorial will teach you how to make different scripts like admin color, saving, loading & many other functions.

old Re: CS2D Lua Scripting Tutorial Development

GreenDevil
User Off Offline

Quote
Blazzingxx has written
@Editorman,
Explain more clear or put it on our language in
Spoiler >


Maybe this is the code i see. Yeah i know this was copied but i need IT VERY MUCH to move a player because i want to make some maps with that...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function st()
	for id=1, player_count do
		if (player(id,"exists")) then
		parse('equip '..id..' 74')
		if (player(id,"tilex")>=18) then
		if (player(id,"tilex")<=225) then
			if (player(id,"tiley")==154) then
				setpos(id,player(id,"x")+10,player(id,"y"))
			elseif (player(id,"tiley")==155) then
				setpos(id,player(id,"x")+10,player(id,"y"))
			elseif (player(id,"tiley")==156) then
				setpos(id,player(id,"x")+10,player(id,"y"))
			else
			end
		end
		end
		if (player(id,"tilex")>=174) then
			if player(id,"tilex")<=176 then
				if player(id,"tiley")>=16 then
					if player(id,"tiley")<=94 then
						setpos(id,player(id,"x"),player(id,"y")+10)
					end
				end
			end
		end

Can't add to spoiler because some bug happen

Edit:
When i try to add this code in my lua it just doesnt work why ?
edited 1×, last 12.12.09 11:05:27 am

old Re: CS2D Lua Scripting Tutorial Development

SQ
Moderator Off Offline

Quote
There was eof, not enough end

Code:
Spoiler >


What hook are you using?

old Re: CS2D Lua Scripting Tutorial Development

GreenDevil
User Off Offline

Quote
This are the hooks
Spoiler >


Finely i know how to use Spoiler

old Re: CS2D Lua Scripting Tutorial Development

NozliW
User Off Offline

Quote
@Editorman and everyone that asks here
that's stupid, that thread is for lua question and that...
you really shouldn't be asking here. anyone will answer your question, and if they don't its because:
-they are occupied
-they don't know
-they haven't got enough time to answer
-they didn't saw you post
-it's impossible (mostly they would tell you)
-they aren't ON
-etc.
anyways i repeat:
That Thread is for lua questions and help, you shoudn't be asking here, just as Flacko said.
edited 1×, last 18.12.09 03:48:21 pm

old Re: CS2D Lua Scripting Tutorial Development

Crazyx
User Off Offline

Quote
-WiLSoN- has written
@Editorman and everyone that asks here
that's stup id, that thread is for lua question and that...
you really shouldn't be asking here. anyone will answer your question, and if they don't its because:
-they are occupied
-they don't know
-they haven't got enough time to answer
-they didn't saw you post
-it's impossible (mostly they would tell you)
-they aren't ON
-etc.
anyways i repeat:
That Thread is for lua questions and help, you shoudn't be asking here, just as Flacko said.


I agree.
They should be more patient...
If someone keeps posting questions after this, they should receive a violation mark in a instance without warning.

old Re: CS2D Lua Scripting Tutorial Development

Heartless Soldier
User Off Offline

Quote
DaveRodec has written
I don't need lessons from you BLazingxx, I need lessons from leegao Object orientated programming in lua for example...



O.o programming in lua? xD.

And yeah everybody wants lessons from leegao but Blazzing knows a lot, what's the problem?

old Re: CS2D Lua Scripting Tutorial Development

SQ
Moderator Off Offline

Quote
He just don't like me, that's problem. I don't care about his opinion.
Anyway, he says that knows everything, but want to know how works simple Object-Oriented programming.
However, I can agree that Leegao's lessons should be more interesting.

By the way, I delayed this project for a while because it doesn't have much attention.
Just about 20 example scripts done right now.
To the start Previous 1 2 3 4 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview