The Daily Click ::. Forums ::. Klik Coding Help ::. Question about lua
 

Post Reply  Post Oekaki 
 

Posted By Message

-MacAdaM-

Megaman Fosho

Registered
  12/02/2008
Points
  560
19th November, 2010 at 00:18:14 -

So today I downloaded Zephni - 8bit & 16bit Level Editors. (http://create-games.com/download.asp?id=8324)
I want to go ahead and try to make a small little game to try and learn some lua. I was wondering if anyone can point me in the right direction? I want to learn how to write lua scripts so I can add doors to go through, and signs to read and things like this.
Sorry if I sound completely lost.. I am

 
Your just jealous that you're not as awesome as me.
(And my megaman avatar )

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
19th November, 2010 at 02:02:23 -

I think this article might help
http://www.create-games.com/article.asp?id=2017

 
n/a

-MacAdaM-

Megaman Fosho

Registered
  12/02/2008
Points
  560
19th November, 2010 at 17:13:00 -

I had a look at that article, and have read a good portion of the lua tutorial. I have to say, this is exactly what I was looking for! thank you!
I think I now have the basic knowledge to start looking deeper into the Lua extension and writing out some useful functions.

 
Your just jealous that you're not as awesome as me.
(And my megaman avatar )

-MacAdaM-

Megaman Fosho

Registered
  12/02/2008
Points
  560
19th November, 2010 at 17:13:01 -

I had a look at that article, and have read a good portion of the lua tutorial. I have to say, this is exactly what I was looking for! thank you!
I think I now have the basic knowledge to start looking deeper into the Lua extension and writing out some useful functions.

 
Your just jealous that you're not as awesome as me.
(And my megaman avatar )

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
19th November, 2010 at 22:00:44 -

Yes, and that level editor is a very good one.

Zephni is being very generous with it considering the amount of work I'm sure he put into it.

 
n/a

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
20th November, 2010 at 18:56:19 -

Thanks guys = btw you can ask me stuff about lua if you want. Once you get past the first bit which can be confusing.. you'll be off making functions all day long, with if statements and anything else you would want from a scripting language. I have done examples and things if anyone wants them. Also i think i have uploaded a couple of things to TDC

 
dont make me divide by zero...

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
20th November, 2010 at 22:42:13 -

Yes, I've used your example files to create my own scripting engine.

Thanks for that!

 
n/a

-MacAdaM-

Megaman Fosho

Registered
  12/02/2008
Points
  560
21st November, 2010 at 15:43:58 -

Zephni, I have looked at most things you have uploaded to TDC about lua. Honestly, I could probably just get an engine working off just what you have uploaded, very good stuff sir . I just like to understand the engines of my games, in case I ever really need to edit it. (which you will, its just part of game design.)
that being said, I want to start trying to write my own functions and whatnot, I am confused on how to implement them into the engine. As of now, I am using your level creator (16-bit one) and loader, but have made my own platform engine.

Lets say I wanted to add a door..
In the level editor, I can place a door object and type in the level name and coordinates I want it to take me too. easy enough ha. In MMF then I would have to have a condition that actually runs the script? just like as if I were quiting I would run the quit script?
Would I have to code the door script myself?

Hah i'm not even sure if my questions makes sense, I just sort of rambled for a moment...
Anyways, this is my first computer language that i'm actually trying to take my time and learn. im sure it shows

 
Your just jealous that you're not as awesome as me.
(And my megaman avatar )

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
21st November, 2010 at 18:48:29 -

It made perfect sence mate. Well, your almost right... exept you would only need ONE script for how doors worked. Then when ever you touch a door/ or enter a door it runs the script. Then, in the door function you make it carry parameters.. which is the level and x,y positions. So your function would look a bit like this:

function door(levelName,newXpos,newYpos)
DoCall("door",levelName,newXpos,newYpos)
end

Then when you get the function called in mmf, just select the parameter 1 for the level name, and so on.
Hope this helps

Edited by Zephni

 
dont make me divide by zero...
   

Post Reply



 



Advertisement

Worth A Click