Portal showing up on black surface? - Solved
Quote from PixelSith64 on May 18, 2011, 1:27 pmHey guys, I'm having some trouble with a map I'm working on.
There's a func_brush that rotates 180 degrees when the laser catcher is powered on. That works fine, but I'm having some problems.
#1. When it's powered on, it flips to a white side, the kind you can shoot Portals on. It works fine, but then when it's powered off, it flips again, but the Portal stays there. It doesn't go away until the catcher is powered again.
Picture of what I'm talking about:
http://imageshack.us/photo/my-images/594/painblack.png/
#2. When the catcher is powered on/off a few times in quick succession, it will get stuck in the catcher-on position when the catcher is off (So instead of being black side when the catcher is off, it's white when the catcher is on).
Any help would be very much appreciated.
Hey guys, I'm having some trouble with a map I'm working on.
There's a func_brush that rotates 180 degrees when the laser catcher is powered on. That works fine, but I'm having some problems.
#1. When it's powered on, it flips to a white side, the kind you can shoot Portals on. It works fine, but then when it's powered off, it flips again, but the Portal stays there. It doesn't go away until the catcher is powered again.
Picture of what I'm talking about:
http://imageshack.us/photo/my-images/594/painblack.png/
#2. When the catcher is powered on/off a few times in quick succession, it will get stuck in the catcher-on position when the catcher is off (So instead of being black side when the catcher is off, it's white when the catcher is on).
Any help would be very much appreciated.
Quote from VitaminZed on May 18, 2011, 4:26 pm1) I think you should be able to wrap that area in a trigger_portal_cleanser and leave it disabled initially. Then when the the catcher flips to 'OnUnpowered', fire an input to 'Enable' the cleanser and then fire another immediately afterwards to 'FizzleTouchingPortals'. That ought to fizzle out the portal within its volume only. Be sure to disable it again afterwards.
2) I had QUITE a bit of trouble using a prop_laser_catcher rigged to a few logic_relays that extended/retracted panels in the map I'm working on. Same situation, if you quickly enable/disable the catcher with a laser repeatedly it fires too rapidly and you end up getting a weird result state.
After looking at a few of the official laser maps, I finally sorted it out by firing a 'CancelPending' to the opposite relay of what was being triggered.
So the prop_laser_catcher was set up with:
OnPowered -> main_open_relay -> Trigger
OnPowered -> main_close_relay -> CancelPendingOnUnpowered -> main_close_relay -> Trigger
OnUnpowered -> main_open_relay -> CancelPendingThen the logic_relays themselves also fire CancelPendings against each other as a backup.
main_open_relay
OnTrigger -> main_close_relay -> CancelPending
OnTrigger -> panel-matrix1_open_relay -> Trigger
OnTrigger -> panel-matrix2_open_relay -> Triggermain_close_relay
OnTrigger -> main_open_relay -> CancelPending
OnTrigger -> panel-matrix1_close_relay -> Trigger
OnTrigger -> panel-matrix2_close_relay -> TriggerPlay around with it a bit, it may solve your issue.
As a side note in case other people run into this, there's a major caveat when using lasers tied to panels: you should set them up without separate opening/closing animations. Instead there's simply one animation that gets switched between SetPlaybackRate 1 and SetPlaybackRate -1 to immediately reverse the panel animation when the laser_catcher is unpowered and smoothly put it back forward when it is powered.
If you try to use SetAnimation for this to toggle an 'open' animation and a 'close' animation, the panels immediately switch to their starting frame on the unpowered/powered state resulting in really jerky animation.
Normally the separate animation method is fine if fired from buttons/switches because they can use a 'Delay Before Reset' to ensure that the animation is complete before you can trigger the opposite animation. The prop_laser_catcher however has no delay so the SetPlaybackRate method should be used instead to ensure a smooth transition.
1) I think you should be able to wrap that area in a trigger_portal_cleanser and leave it disabled initially. Then when the the catcher flips to 'OnUnpowered', fire an input to 'Enable' the cleanser and then fire another immediately afterwards to 'FizzleTouchingPortals'. That ought to fizzle out the portal within its volume only. Be sure to disable it again afterwards.
2) I had QUITE a bit of trouble using a prop_laser_catcher rigged to a few logic_relays that extended/retracted panels in the map I'm working on. Same situation, if you quickly enable/disable the catcher with a laser repeatedly it fires too rapidly and you end up getting a weird result state.
After looking at a few of the official laser maps, I finally sorted it out by firing a 'CancelPending' to the opposite relay of what was being triggered.
So the prop_laser_catcher was set up with:
OnPowered -> main_open_relay -> Trigger
OnPowered -> main_close_relay -> CancelPending
OnUnpowered -> main_close_relay -> Trigger
OnUnpowered -> main_open_relay -> CancelPending
Then the logic_relays themselves also fire CancelPendings against each other as a backup.
main_open_relay
OnTrigger -> main_close_relay -> CancelPending
OnTrigger -> panel-matrix1_open_relay -> Trigger
OnTrigger -> panel-matrix2_open_relay -> Trigger
main_close_relay
OnTrigger -> main_open_relay -> CancelPending
OnTrigger -> panel-matrix1_close_relay -> Trigger
OnTrigger -> panel-matrix2_close_relay -> Trigger
Play around with it a bit, it may solve your issue.
As a side note in case other people run into this, there's a major caveat when using lasers tied to panels: you should set them up without separate opening/closing animations. Instead there's simply one animation that gets switched between SetPlaybackRate 1 and SetPlaybackRate -1 to immediately reverse the panel animation when the laser_catcher is unpowered and smoothly put it back forward when it is powered.
If you try to use SetAnimation for this to toggle an 'open' animation and a 'close' animation, the panels immediately switch to their starting frame on the unpowered/powered state resulting in really jerky animation.
Normally the separate animation method is fine if fired from buttons/switches because they can use a 'Delay Before Reset' to ensure that the animation is complete before you can trigger the opposite animation. The prop_laser_catcher however has no delay so the SetPlaybackRate method should be used instead to ensure a smooth transition.
Quote from PixelSith64 on May 18, 2011, 4:54 pmI'll give this a try, thanks for the help!
I'll give this a try, thanks for the help!
Quote from VitaminZed on May 18, 2011, 6:27 pmCool, no prob. Let us know how it works out, in particular the trigger_portal_cleanser since I haven't actually used that myself yet.
Cool, no prob. Let us know how it works out, in particular the trigger_portal_cleanser since I haven't actually used that myself yet. ![]()
Quote from PixelSith64 on May 22, 2011, 6:40 pmVitaminZed wrote:Cool, no prob. Let us know how it works out, in particular the trigger_portal_cleanser since I haven't actually used that myself yet.Have only tried using the portal_cleanser, but what you suggested worked. I had to mess with it a little bit to get it, but it does work, thanks!
At the same time, somehow it solved the other problem I was having of triggering both the door and the panel at the same time. I'm going to try your second answer just to make sure that doesn't happen at all though.
Have only tried using the portal_cleanser, but what you suggested worked. I had to mess with it a little bit to get it, but it does work, thanks!
At the same time, somehow it solved the other problem I was having of triggering both the door and the panel at the same time. I'm going to try your second answer just to make sure that doesn't happen at all though.
