Scripting: action when gobelin is torn out?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Scripting: action when gobelin is torn out?

Post by THOM »

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.
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Scripting: action when gobelin is torn out?

Post by THOM »

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?
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
User avatar
Dr.Disaster
Posts: 2876
Joined: Wed Aug 15, 2012 11:48 am

Re: Scripting: action when gobelin is torn out?

Post by Dr.Disaster »

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.
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: Scripting: action when gobelin is torn out?

Post by JohnWordsworth »

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.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Scripting: action when gobelin is torn out?

Post by minmay »

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.
Post Reply