Page 1 of 1

[SOLVED] call hooks from ingame script

Posted: Sun Jul 19, 2015 2:38 pm
by Granamir
Hi everyone,
sorry today i'm lazy so didn't make a search if an answer already exists.

Just want to know,if possible, how to call an inside hook of an object (say a monster) from an ingame script; so that i can change a specific monster behaviour without creating a new monster in my monster.lua file.
TY

Re: call hooks from ingame script

Posted: Sat Aug 01, 2015 11:23 pm
by Isaac
Granamir wrote:Hi everyone,
sorry today i'm lazy so didn't make a search if an answer already exists.

Just want to know,if possible, how to call an inside hook of an object (say a monster) from an ingame script; so that i can change a specific monster behaviour without creating a new monster in my monster.lua file.
TY
It might be better to have the hook always call the in-game script; where you can change how the function behaves.
The script can get the calling monster as an argument, and you can do your checks on it, and make changes to the outcome based on the individual monster calling the script.

Re: call hooks from ingame script

Posted: Sun Aug 02, 2015 4:43 pm
by Granamir
Understood. TY