Jump to content

Home

Grim Launcher 1.3.1 - Loading Lua Scripts


lagamorph321

Recommended Posts

Posted

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.knock_costume="msb_knock_on_door.cos"

manny:push_costume(manny.knock_costume)

manny:play_chore(ma_knock_on_door_knock,manny.knock_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!

Posted

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.

Posted

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.

Posted

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...