FAQ  •  Login

Implementing lua?

<<

Craziestdan

Warrant Officer 1
Warrant Officer 1

Posts: 1043

Joined: Wed Mar 26, 2008 2:36 pm

Post Fri Sep 19, 2008 8:25 pm

Implementing lua?

Hey,
As you may know i'm desperately trying to get a better camera for Dreamball. I would probably pay someone to do it, but know one seems interested anywhere i've checked.

So i found something for garry's mod 9, a Lua build game mode called melon racer. It is basicly what i want - A camera chasing a physic model (being my marble) but the problem is how do i implement this in my mod? It is just a single lua file i have and it is meant to go in the garry's mod/addons folder i believe. But this doubtfully will work if i place it in a addon folder in my mod. I assume the garry's mod code has been built to enable lua, and has some thing that says 'addons folder is where mini mods go' - translated in C++ :D

Anyone know how i can do this to my code? So i can use the Lua? Or... Anyone know any programmers i could ask?
<<

vecima

User avatar

Type 3
Type 3

Posts: 2409

Joined: Sun Jun 24, 2007 7:32 pm

Location: New Jersey

Post Sat Sep 20, 2008 4:59 pm

Re: Implementing lua?

I think you have to download the Lua Source code, and include it in your project in visual studio, and then write hooks of some kind to allow the Lua Scripts to access your C++ functions. It's a somewhat advanced exercise from what i can tell, but certainly not impossible.

i did a quick search, and while i didn't come up with a tutorial on doing it in Source, I did notice some people recommended checking out the Lua website and reading documentation.

This is something I would be interested in doing myself if I weren't already behind on other projects.
<<

Craziestdan

Warrant Officer 1
Warrant Officer 1

Posts: 1043

Joined: Wed Mar 26, 2008 2:36 pm

Post Sun Sep 21, 2008 12:09 am

Re: Implementing lua?

Hmm, i did a brief search on the Lua website, but from what i can tell it is Lua in general, rather then Half Life 2. Guess i'll keep looking :(
<<

vecima

User avatar

Type 3
Type 3

Posts: 2409

Joined: Sun Jun 24, 2007 7:32 pm

Location: New Jersey

Post Sun Sep 21, 2008 3:04 pm

Re: Implementing lua?

yeah, the Lua website won't tell you how to put it into HL2, but it will tell you how to put it into any C++ application (i think).
<<

Craziestdan

Warrant Officer 1
Warrant Officer 1

Posts: 1043

Joined: Wed Mar 26, 2008 2:36 pm

Post Sun Sep 21, 2008 3:49 pm

Re: Implementing lua?

Hmm, maybe i'll look through it...
Still, i don't think i'lll be experienced enough if it says how to put it in C++ then should be easy. But getting the lua file to work like in Gmod will be a lot harder.
<<

Craziestdan

Warrant Officer 1
Warrant Officer 1

Posts: 1043

Joined: Wed Mar 26, 2008 2:36 pm

Post Mon Sep 22, 2008 9:14 pm

Re: Implementing lua?

<<

joff

User avatar

First Sergeant
First Sergeant

Posts: 787

Joined: Sat Oct 25, 2008 2:44 am

Location: Reading / UK

Post Sat Oct 25, 2008 2:47 am

Re: Implementing lua?

I would recommend not using LUA unless you know what you are doing, Keep LUA for the PSP dev work
Programmer / Web Designer / Server Admin
www.joffcom.net
www.pontification.net

Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.