Hiding a patch near a door


#1

I’m trying to disable a patch beside a door before the video of the door opening plays. It is enabled and hangs on top of the video, but not in the correct position — ugly. The following code disables the patch, but not before the video plays. ( I was planning to re-enable the patch when walking back through the door from the other side.)

StorDr = addDoor(SSH1, SSStorage, WEST, "SS", function() solvedHallDrPanel_2:disable() end) StorDr:disable()

Any suggestions? The only other alternative that I can think of is to crop my door video and play it on a patch with a spot to switch to the next room.


#2

You’re using the addDoor function from the Asylum teaser code. It’s not a very flexible function… Rather, you should add your own custom implementation. Take a look at how I solved a similar problem in the Showers room from Asylum :slight_smile:


#3

Got it! Thanks, Agustin. I’ll try that. :slight_smile:

P.S. - I’m making great progress with Adamantus and just finished my first set of puzzles today. :yahoo:


#4

Yay!!

Sent from my iPhone using Tapatalk


#5

Okay, I probably did not explain what I need to do properly. I want to hide the patch before or as the door’s video plays. Changing the door as suggested doesn’t help.

Here’s the scenario. There’s a puzzle panel next to the door, which changes in appearance once the puzzle is solved and the door becomes openable. So, once the player steps back from the panel a patch is enabled showing the solved state of the panel on the node. BUT, when the door opens, the patch floats above it so that there are two panels, one slightly off kilter. There are several doors so the changed state of the door panel is necessary for the player to see.

So is there a way to disable the patch so that it doesn’t show while the door’s video plays? I can enable it again when re-entering from the other side, no problem.

If not, I’ll redesign the puzzles and figure out some other “clue” that each particular door has been solved.


#6

But it has to work… You should do something like this:

door = theRoom:addSpot( Spot(NORTH, {64, 424}, {sync = true}) )
door:attach(VIDEO, "door.ogv")
door:attach(FUNCTION, 
	function()
		if condition == true then
			-- Disable the patch
			patch:disable()
			
			-- Play the video and make the switch
			self:play()
			switch(anotherRoom)
			
			-- Re-enable the patch
			patch:enable()
			self:stop()
		else
			-- Do something else, probably deal with the puzzle...
		end
	end)

#7

It worked! Thanks again.