Hey
does someone know if you can add an action when a gobelin is torn out?
I tried the "onDie" hook, but it had no result.
Scripting: action when gobelin is torn out?
Re: Scripting: action when gobelin is torn out?
Really no one an idea?
Gobelins seem to have some hardcoded attributes (sound, health) - and no other hooks, that could be used...
Maybe some scripting resolution?
Gobelins seem to have some hardcoded attributes (sound, health) - and no other hooks, that could be used...
Maybe some scripting resolution?
- Dr.Disaster
- Posts: 2876
- Joined: Wed Aug 15, 2012 11:48 am
Re: Scripting: action when gobelin is torn out?
Gobelins belong to object class "WallTapestry" and beside placing and breaking them there is nothing else that can be done with them. The only option i see (and i don't know how to do it) is to write a script that checks if a specific gobelin was torn down. If that's not possible a class change is required to enable any action.
- JohnWordsworth
- Posts: 1397
- Joined: Fri Sep 14, 2012 4:19 pm
- Location: Devon, United Kingdom
- Contact:
Re: Scripting: action when gobelin is torn out?
About to get on a plane in an hour or so, so can't post a full solution right now but I think the way I would do it is to add a function to the party onAttack hook and then check to see if the specific Wall Tapstry is 'directly in front' of the player. Attacks on Wall Tapestry's always hit I think, so you should be able to assume you always hit it if it's there.
Another possibility (maybe) is to make a new blockage perhaps, which is a single model made of both a wall and the tapestry meshes merged together. I think you can query a blockage to see if it's destroyed? This doesn't seem like the best solution, but I'm just throwing out an alternative route if there is a reason why (A) wouldn't work.
Another possibility (maybe) is to make a new blockage perhaps, which is a single model made of both a wall and the tapestry meshes merged together. I think you can query a blockage to see if it's destroyed? This doesn't seem like the best solution, but I'm just throwing out an alternative route if there is a reason why (A) wouldn't work.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Re: Scripting: action when gobelin is torn out?
You'll also need to account for the tapestry being destroyed by a fireball.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.