trapdoors

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
Daniknamchang
Posts: 7
Joined: Thu Jul 14, 2016 4:27 pm

trapdoors

Post by Daniknamchang »

So I wanted to link some trapdoors to a script but i keep getting an error saying that it was a nil value. I think I'm missing the ending of the name like how a pedestal is whatever the name is .surface.
What do you add for a trapdoor.

And a teleporter. That one would help too.
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: trapdoors

Post by bongobeat »

to open a trapdoor

Code: Select all

my_trap_door_1.controller:open()
to close a trapdoor

Code: Select all

my_trap_door_1.controller:close()
to toggle the trapdoor (if his actual state is closed, it will open itself)

Code: Select all

my_trap_door_1.controller:toggle()
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
User avatar
Zo Kath Ra
Posts: 940
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: trapdoors

Post by Zo Kath Ra »

Have you watched Skuggasveinn's editor tutorials?
viewtopic.php?f=22&t=7055
Mortis_of_Midian
Posts: 14
Joined: Wed Dec 10, 2014 6:07 pm

Re: trapdoors

Post by Mortis_of_Midian »

If you want a trapdoor to detect if somthing is placed on it try putting a Floor Trigger in the same square as your TrapDoor and linking your script to that
Post Reply