Trigger that executes Lua

Any aspects of level design for the Source engine.

Trigger that executes Lua

Postby kingisalive on Thu May 22, 2014 10:02 am

Hi!

Is there any way to execute Lua as an output from something like trigger_once entity?

I'm looking for an entity that would allow me to execute a bit of a Lua code in which I can access all the global classes like gamemode hooks for instance.
Then, ideally I would like to sent a BeginSequence to a scripted_sequence based on what comes back from the Lua code. Or send it from the Lua code directly.
Last edited by kingisalive on Thu May 22, 2014 11:13 am, edited 1 time in total.
kingisalive
Member
Member
 
Joined: Tue May 20, 2014 2:01 pm

Re: Trigger that executes Lua

Postby Lhorkan on Thu May 22, 2014 10:36 am

I have never worked with these myself so I could be totally wrong, but this might be what you're looking for.
Lhorkan
Member
Member
 
Joined: Thu Feb 21, 2008 9:08 pm

Re: Trigger that executes Lua

Postby kingisalive on Thu May 22, 2014 10:43 am

Lhorkan wrote:I have never worked with these myself so I could be totally wrong, but this might be what you're looking for.


I'm using this in Garry's Mod. Left 4 Dead is on a different branch of Source, right? Thanks for the tip but this entity is not available to me. And even if it were, I still don't know how to send input form inside Lua script to other entities.
kingisalive
Member
Member
 
Joined: Tue May 20, 2014 2:01 pm

Re: Trigger that executes Lua

Postby kingisalive on Thu May 22, 2014 11:13 am

I think I'm gonna go with a very flexible solution described here: http://facepunch.com/showthread.php?t=1055728&p=27805956&viewfull=1#post27805956

With this piece of code I can do pretty much everything I want. I think.
kingisalive
Member
Member
 
Joined: Tue May 20, 2014 2:01 pm

Return to Hammer Editor Help

Who is online

Users browsing this forum: No registered users