Portal 2

Portal 2

Community maps. For science.
Welcome to Aperture Laboratories, home of the Perpetual Testing Initiative. Easily create, share and play test chambers authored by and for the Portal 2 community. Do your part! Contribute to Science!
Konke 2 Feb 14, 2014 @ 12:20am
[Hammer] stair ramp (arms)

I made a stair ramp with arms but they seem to bug when I trigger them on and off quickly. They don't always finish they're animation and stop at random positions.

The stairs are made of 12 arms with panels attached. They have a ramp animation, triggered with a cube button. OnPressed triggers the animation and the stairs are lining up. They also have different time inputs so it'll give a more portal like look.

Any ideas? Thanks in advance!
< >
Showing 1-5 of 5 comments
TeamSpen210 19 Feb 14, 2014 @ 2:59am 
That's because outputs won't be canceled if you set them up like that. You want to have two logic_relays (for open and close), each having the timed SetAnimation outputs. You want to use the OnTrigger outputs. In the cube button, OnPressed Trigger the open relay and CancelPending the close relay. This stops those outputs from firing later. Do the reverse as well, OnUnPressed Trigger the close relay and CancelPending the open relay.

You may also want to try using setPlaybackRate instead of both animations. Set the panels to all default to an extending animation, then give them an input of SetPlayBackRate with a parameter of -1. This makes them play the animation backwards. When you want to open them trigger SetPlayBackRate with a parameter of 1. Make sure "hold animation" is on!
Konke 2 Feb 15, 2014 @ 4:27am 
Wow, I just had to add CancelPending on OnPressed and OnUnPressed. Now it doesn't bug anymore. Perhaps I should use CancelPending on all animations of this sort...

Why should i use setPlaybackRate backwards on the closing animation? Is it the same animation as the "real" closing animation? Just wondering. Are there any benefits? Cheaper perhaps?

Thanks for the answer, really helped me out!
TeamSpen210 19 Feb 15, 2014 @ 11:47am 
If you are using timed outputs this way with a player input I'd always use CancelPending.

The animation could sometimes look a little odder (animations have pauses and speed up/slow down), but using it means that when rapidly pressing the button the stairs won't "teleport" to the beginning of the animation if they are halfway there already.
Konke 2 Feb 16, 2014 @ 1:44am 
Ah, that's good to know. But at the same time - if I use CancelPending, there wouldn't be a problem that the animation teleports back, no?
TeamSpen210 19 Feb 16, 2014 @ 1:57am 
It's only visual, but try firing the SetAnimation input twice at the model - in order to play the animation, it starts at the position in the first frame. If it has played another animation and is in a different pose, the model will very quickly move into the position for the first frame. It just looks a bit odd.
< >
Showing 1-5 of 5 comments
Per page: 15 30 50

Date Posted: Feb 14, 2014 @ 12:20am
Posts: 5