Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Moveable book unlocks a door?
oscar1007 Offline
Member

Posts: 64
Threads: 24
Joined: Oct 2011
Reputation: 0
#1
Moveable book unlocks a door?

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!

Money can't buy you happiness. But I rather cry in my ferrari.

PROJECT:
http://www.moddb.com/mods/oscar1007
07-24-2012, 11:31 AM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: Moveable book unlocks a door?

make it collide with a script are Smile

07-24-2012, 11:33 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#3
RE: Moveable book unlocks a door?

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!

I rate it 3 memes.
07-24-2012, 11:34 AM
Find
oscar1007 Offline
Member

Posts: 64
Threads: 24
Joined: Oct 2011
Reputation: 0
#4
RE: Moveable book unlocks a door?

ah that is smart ! Smile

Thanks!

Money can't buy you happiness. But I rather cry in my ferrari.

PROJECT:
http://www.moddb.com/mods/oscar1007
07-24-2012, 11:56 AM
Find




Users browsing this thread: 4 Guest(s)