View Full Version : "Execute Lua Code" Editing outside of NRD?
NeoMorph
July 24th, 2007, 06:18 PM
Is there any way to edit the lua attached to the action "Execute Lua Code" outside of NRD and link it back to the button. I know you can externally edit the System lua code as it's the same name as the ccf but with the lua extension.
Using that tiny unsizable text entry box is a pain to say the least.
theguywiththefunnyhair
July 24th, 2007, 08:01 PM
Is there any way to edit the lua attached to the action "Execute Lua Code" outside of NRD and link it back to the button.
There most certainly is.
In your ccf's .lua file create your Lua code as a function like
function myfirstfunc(var1,var2)
print('button pressed')
endthen on the button itself simply put the line
myfirstfunc('var1', 'var2')now when you press the button you should see the line 'button pressed' in your Lua console.
Remember if your function will manipulate the button it is executed from or a parent of that button you should use execute on release.
Hope that helps
Dan
NeoMorph
July 24th, 2007, 08:23 PM
Cheers Dan... That's what I was looking for.
Unfortunately at the moment NR is refusing to load so I can't try anything.
I swear I'm jinxed! :(
theguywiththefunnyhair
July 24th, 2007, 11:52 PM
sometimes if it does that, you can just delete (or rename) the currently loaded .ccf file then re-open NR, it should ask you to specify a new .ccf and your away.
Cheers
Dan
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.