Frictional Games Forum (read-only)

Full Version: Moveable book unlocks a door?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey!

To begin with, yes I have looked through the forums searching for an answer to this, yet I couldn't find any.

So, as the title says, I wan't a door to get unlocked when the player drags out a book from a bookshelf.

How do I script that?


The book is already in the world named "book_moveable_1".

Someone please help me Smile

Thanks!
make it collide with a script are Smile
Create a small script_area where you know it will only make contact with the book when it is pulled all the way out (this is the most difficult part; make sure to thoroughly test it in dev mode and use debug messages for this). From there, simply set up an entity collide callback, using the book as the parent, and the script area as the child.

Hope that helped!
ah that is smart ! Smile

Thanks!