Hi eveyone,
trying to hold a monster so he can't attack and move but can do everything else. It's easy to do from editor but i also have to change these settings via script.
Anyone has a clue on how to do to enable/disable (via script) monster components such as: model, move, turn, attacks, summon, etc.?
Ty
Enabling/disabling monster components [SOLVED]
Enabling/disabling monster components [SOLVED]
Last edited by Granamir on Thu Feb 19, 2015 3:48 pm, edited 1 time in total.
Re: Enabling/disabling monster components
All components have a disable() enable() method. When you check and uncheck components in the editor, it is actually calling these commands in your dungeon file (Dungeon.lua).Granamir wrote:Hi eveyone,
trying to hold a monster so he can't attack and move but can do everything else. It's easy to do from editor but i also have to change these settings via script.
Anyone has a clue on how to do to enable/disable (via script) monster components such as: model, move, turn, attacks, summon, etc.?
Ty
So you can call this in a script to turn off a monster's brain for example:
trickster_1.brain:disable()
Re: Enabling/disabling monster components
Works great.MrChoke wrote:All components have a disable() enable() method. When you check and uncheck components in the editor, it is actually calling these commands in your dungeon file (Dungeon.lua).Granamir wrote:Hi eveyone,
trying to hold a monster so he can't attack and move but can do everything else. It's easy to do from editor but i also have to change these settings via script.
Anyone has a clue on how to do to enable/disable (via script) monster components such as: model, move, turn, attacks, summon, etc.?
Ty
So you can call this in a script to turn off a monster's brain for example:
trickster_1.brain:disable()
Thank you.