Skip to main content

Search

Can you help me with my door logic?

  • thebiv

    Update....Well it seems I have an unnecessary toggle after the "or" gate, so that's part of the issue. It's also been recommended to me to change the two signals to "pulse" before entering the gate.


    But a second question cropped up. I'm using a keyframe/counter combo to trigger a toggle to turn a keyframe off and on at the end. This is so the door will stay open after the animation is complete.

    If anyone has a better way to do that, I'd really be interested in that as well.

  • thebiv

    Oops, that was "....change the two signals to "pulse" before entering the "OR" gate."

  • presssquaretoeat

    Hi Biv

    Thanks for the idea. I did have a crack myself and had some success with a lot less logic. Less is definitely better when it comes to keeping track of things :-) I think having multiple timelines with keyframes affecting the same objects might be your problem but I didn't work it out for sure.

    My approach was to use a single timeline and then play it backwards and forwards with just one Signal Manipulator:

    First I made a Counter that would store the detected/not detected state of the trigger zone.

    -Counter plus when Detected triggered
    -Counter minus when Not ( Detected triggered )

    Output the Counter Full signal to a Signal Remapper

    Set the Remapper mode on the SM gadget to Smoothing Only and the Rise and Fall values to 3s and 1s.

    Output the signal from the SM to the Playhead Position of the timeline

    Now when your Trigger zone is detected it will send a signal from 0 to 1 over 3 seconds and set your door animation to that point in its cycle. Leave the zone and the Signal Remapper will go from 1 to 0 over 1 second closing them quickly.

    I added some extra logic to pause the animation once the doors were fully open ( using the Freeze Output setting on the SM set to a timer ). Search the dreamiverse for 'Door For thebiv'.

  • presssquaretoeat

    Something that helped me too in figuring this out was that if you change the Trigger Zone from 'Possessed Controller Sensor' to 'Possessable Controller Sensor' then you can move the puppet in and out of the Trigger Zone in Edit Mode; this let's you keep the Microchip open and if time is running you can see which chip logic is being activated. Much simpler than jumping into Play mode for every test :-)

  • thebiv

    Dude, you are awesome. I never thought of doing it like that. I'm going to have fun dissecting that. :)

    So I want the rise values set to three and the fall values set to one, right?

    I know I can see it in your example, but i want to understand the concepts

  • thebiv

    That second part is also great info. I'll remember that.

  • presssquaretoeat

    I wish we could edit comments :|

    Re: the signal remapper up/down value it will actually increase and decrease from it's last known value NOT between 0 and 1. This is what gives the animation the smooth open / close effect.

  • presssquaretoeat

    3 and 1 could be anything. It;s just the length of time it will take for the animation to start and end.

    To clarify - A timeline begins at 0 and ends at 1. A signal manipulator begins at 0 and ends at 1. If you set the signal rise to 3 seconds it will just take 3 seconds to get to 1 ( ie the end of the animation ). You can set these numbers to whatever you fancy.

  • thebiv

    I just had no idea there was a way to play the timeline backwards.

    Dumb question, when a timeline gets to the end, it stops triggering the last keyframe. That's been one of my biggest issues.

    Does the signal remapper stop that from happening?

  • presssquaretoeat

    Have you scaled your keyframes up? Ie your keyframes aren't little vertical lines they are fat bad boys extending down the timeline?

  • thebiv

    "

    3 and 1 could be anything. It;s just the length of time it will take for the animation to start and end.

    To clarify - A timeline begins at 0 and ends at 1. A signal manipulator begins at 0 and ends at 1. If you set the signal rise to 3 seconds it will just take 3 seconds to get to 1 ( ie the end of the animation ). You can set these numbers to whatever you fancy."

    Ah, gotcha. That's a useful tool.

  • thebiv

    "Have you scaled your keyframes up? Ie your keyframes aren't little vertical lines they are fat bad boys extending down the timeline?"

    To be clear, I'm not at home. I'm doing this from memory.

    Not in this specific case. The key frame is at the very end of the timeline, so if the timeline stops at the end, it's hovering over the keyframe.

    So I've always had an issue with the timeline ending and that last keyframe no longer being active. That's why I had the toggle with the extra keyframe, to keep it "on".

    I need to take a look at what you did when I get home

  • presssquaretoeat

    I remember having this problem but I have no idea how I fixed it. I remember tweaking the timeline settings randomly, extending the length of all the keyframes and then dragging the right edge of the timeline backwards and then it worked.

    Tried to replicate with the working dream and it was all fine. I'll be interested in how it works out for you.

  • thebiv

    I can't wait to play with that Signal Remapper. I think your suggestion is going to be the solution for problems I was having on other projects as well.

  • thebiv

    Thanks presssquaretoeat. I need to modify the door speed still, but it all works.

    https://www.youtube.com/watch?v=uO_Zzhr5QSg

  • presssquaretoeat

    Nice one Biv, good job! Your robot looks great. I cannot sculpt to save my life so here I am helping people solve logic problems on the forums instead :-)

  • SKEME_DBT

    I had the same problem, and came up with a way to make it work, but it had problems. I've just checked your 'Door for thebiv', and it seems to be exactly what I was aiming to acheive with my own door logic. Great work, presssquaretoeat! Just one quick question - how is the freezing of the last keyframe actually done? I know you said you used the Freeze Outout on the SM, but I'm guessing you redid this another way, because I cant see any wires coming from the SM's Freeze Output.

Please sign in to leave a comment.