Door Pull Chain

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
RayB
Posts: 140
Joined: Fri Mar 06, 2015 3:45 am

Door Pull Chain

Post by RayB »

I would like to trigger something when a door pull chain is pulled. Is this possible and if so how would you go about this. With all this component business I would think there has to be a way to do this.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Door Pull Chain

Post by minmay »

Pull chains are ordinary objects, just look at their definitions in the asset pack. You can easily add a connector to the PullChainComponent although you will need to do so dynamically with PullChainComponent:addConnector() rather than using the '+' button in the editor.
Last edited by minmay on Wed Feb 10, 2016 1:36 am, edited 1 time in total.
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.
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Door Pull Chain

Post by THOM »

Most easiest way would be to give a door the pullchain not by checking the box in it's editor-entry but by using the single pullchain-lever-object. With that you can choose everything that should be triggered by the pullchain like you could do with every other lever also.

EDIT: minmay was faster...
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
RayB
Posts: 140
Joined: Fri Mar 06, 2015 3:45 am

Re: Door Pull Chain

Post by RayB »

Thanks guys! Once again you have helped me through the fog.
Post Reply