View unanswered posts | View active topics It is currently Thu Dec 26, 2024 6:27 pm



Reply to topic  [ 50 posts ]  Go to page 1, 2, 3, 4  Next
 trying to learn Lua.... cant understand 
Author Message

Joined: Sat Oct 01, 2011 9:06 pm
Posts: 125
Location: london
Reply with quote
Post trying to learn Lua.... cant understand
im trying to learn Lua but I cant understand most of the words used to explain im like what does that mean :o


Mon Dec 12, 2011 9:14 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: trying to learn Lua.... cant understand
With "words" you mean functions? Like, I dunno, CastMORay, ToActor?

You can use the wiki to learn about functions. Syntax is very easy, if that's your problem, you can ask also.


Tue Dec 13, 2011 5:27 am
Profile

Joined: Sat Oct 01, 2011 9:06 pm
Posts: 125
Location: london
Reply with quote
Post Re: trying to learn Lua.... cant understand
1) "scriptpath = <path to Lua file>" in the objects code block with appropriate tabbing

2) about variables how to add them what they are and why

3) and loads of others


Tue Dec 13, 2011 8:23 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: trying to learn Lua.... cant understand
Have you tried looking at the Lua tutorial stickied in this forum?


Tue Dec 13, 2011 9:13 pm
Profile

Joined: Sat Oct 01, 2011 9:06 pm
Posts: 125
Location: london
Reply with quote
Post Re: trying to learn Lua.... cant understand
thats where I got ^^ from (my questions) the tut was aimed at inexperienced modders and im so bad I cant even understand that :')


Tue Dec 13, 2011 9:19 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: trying to learn Lua.... cant understand
I learnt from there.

Alright, if you want to learn, let's start from something specific: what do you specifically don't understand? Everything? Is there something you understand?


Tue Dec 13, 2011 9:47 pm
Profile

Joined: Sat Oct 01, 2011 9:06 pm
Posts: 125
Location: london
Reply with quote
Post Re: trying to learn Lua.... cant understand
the only thing I get is how to make a Lua. file haha and your really gonna teach me :O im tough work


Tue Dec 13, 2011 10:01 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: trying to learn Lua.... cant understand
I don't have any problems on teaching you, not at all, but I doubt we can spam this thread with teachings.


Wed Dec 14, 2011 4:52 am
Profile
User avatar

Joined: Mon Apr 13, 2009 12:27 pm
Posts: 813
Location: Yogyakarta, Indonesia. A slice o' paradise.
Reply with quote
Post Re: trying to learn Lua.... cant understand
Sly-UX1XN wrote:
1) "scriptpath = <path to Lua file>" in the objects code block with appropriate tabbing

2) about variables how to add them what they are and why

3) and loads of others


At least I can provide explanation for #1. The scriptpath thingy there is to 'link' the CC .ini object (for example, an actor) to a .lua script (which does things to the actor, say make a hovering moustache over the actor). So, for example, you have a .lua file, moustache.lua, that does this to actors. You want Mia, the Ronin actor, to have a companion moustache, so you put the line 'scriptpath = Ronin.rte/moustache.lua' (assuming you plopped that straight in Ronin.rte folder) somewhere in Mia's .ini definition. But then you also want Dmitri to have a companion moustache too, so you just plop the same line somewhere in Dmitri's .ini definition. Got that?


Wed Dec 14, 2011 3:52 pm
Profile YIM WWW

Joined: Sat Oct 01, 2011 9:06 pm
Posts: 125
Location: london
Reply with quote
Post Re: trying to learn Lua.... cant understand
ahhhhhh
and why cant we spam the thread


Wed Dec 14, 2011 9:55 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: trying to learn Lua.... cant understand
Well, if I can spam the thread without it being a problem, I can teach you basic things.


Thu Dec 15, 2011 5:32 am
Profile

Joined: Sat Oct 01, 2011 9:06 pm
Posts: 125
Location: london
Reply with quote
Post Re: trying to learn Lua.... cant understand
who do we ask to spam the thread?


Thu Dec 15, 2011 9:04 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: trying to learn Lua.... cant understand
No one, let's begin.

ScriptPath

carriontrooper wrote:
At least I can provide explanation for #1. The ScriptPath thingy there is to 'link' the CC .ini object (for example, an actor) to a .lua script (which does things to the actor, say make a hovering moustache over the actor). So, for example, you have a .lua file, moustache.lua, that does this to actors. You want Mia, the Ronin actor, to have a companion moustache, so you put the line 'ScriptPath = Ronin.rte/moustache.lua' (assuming you plopped that straight in Ronin.rte folder) somewhere in Mia's .ini definition. But then you also want Dmitri to have a companion moustache too, so you just plop the same line somewhere in Dmitri's .ini definition. Got that?


Remember you've got to type "ScriptPath" with the corresponding capitals.

Understood?


Thu Dec 15, 2011 9:13 pm
Profile

Joined: Sat Oct 01, 2011 9:06 pm
Posts: 125
Location: london
Reply with quote
Post Re: trying to learn Lua.... cant understand
Understood but do you put that in the actors.ini or on a .Lua notepad you make yourself?


Thu Dec 15, 2011 9:35 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: trying to learn Lua.... cant understand
ScriptPath = YourMod.rte/Your/Path/ToTheLua/File.lua goes anywhere inside the actor's, gun's or bullet's ini code, just like if you were adding an extra variable like Sharpness, Mass or HitsMOs.


Thu Dec 15, 2011 9:38 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 50 posts ]  Go to page 1, 2, 3, 4  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.520s | 13 Queries | GZIP : Off ]