View Full Version : Grim Launcher 1.3.1 - Loading Lua Scripts

11-09-2006, 02:47 AM
Hi All,

I was wondering if someone could tell me how to get a lua script to work using Grim Launcher.

I've been able to successfully issue these commands one at a time by pressing ctrl + E.

manny:play_chore(ma_knock_on_door_knock,manny.knoc k_costume)

Here is what i've tried...

1. I place these three lines into a file I've named GR_Knock.LUA in my c:\ directory.

2. I use alt+s to bring up the dialogue box

3. Type in "c:\GR_Knock.LUA" in the dialogue box

4. Click on OK.

No costume change, no knocking on door action.

Do I need to put my script into a specific directory?

Any help would be appreciated. Thanks!

11-09-2006, 12:49 PM
I've never actually tried loading a lua script. Grim scripts in the resource files are compiled, it may be that the engine cant load uncompiled scripts.

11-09-2006, 12:57 PM
I'll try compiling my script using scumm rev (if it can do that). Thanks for the info.

11-09-2006, 01:08 PM
Try to put the commands into a function, then call the function from the game.
If GrimE uses the "standard" Lua-way of loading scripts, then the actual script is not executed at load-time but only prepared to be called later.

11-09-2006, 01:48 PM
oh, i see.

So, I'll try these steps...
1. Put my commands into a lua function
2. Compile my script (may or may not be necessary)
3. Load it using the alt+s command.
4. Use the ctrl+e command in grim launcher to call my function.

Thanks for the clarification.

11-09-2006, 01:58 PM
I'm not sure if that works but it's (as always :)) worth a try.