@Aarons123 No problem! To change the direction of the bidirectional delay, we invert some of the functions: Bool * floor(smooth(clamp01(Bool), Bool ? 1 / delayTime : pow(10,10) ))
. Where: Bool = a boolean input. For example, an activation group (Activate1) delayTime = your delay time (seconds)
.
This delay behaves the way that you would expect a delay to behave. It looks the way it does to allow the smooth function to behave as we want it to.
You use a modified version of something that I call a bidirectional delay function: ceil(smooth(clamp01(Bool), Bool ? pow(10, 10) : 1 / delayTime ))
. Where: Bool = a boolean input. For example, an activation group (Activate1) delayTime = your delay time (seconds)
.
This code is the inverse of what I am used to doing, so I'm not sure if it will be right. Let me know if it works. If not, I can edit it as needed. @Aarons123 @jamesPLANESii
.
Edit: The first bool was removed as it messed up the delay.
@spefyjerbf oh sorry it turns out I didn’t read properly as well, I need it to have a delay once Act2 is turned of, but not have a delay once it is turned on. Now this is just getting confusing
@spefyjerbf Ik it’s been like 30 years but I’ve tried using the first formula on a piston to do piston things, this is exactly what I put as the input, Activate2 * ceil(smooth(clamp01(Activate2), Activate2 ? pow(10, 10) : 1 / 3 )). I can’t tell what I’ve done wrong but there’s no delay. Thanks for your help again
@spefyjerbf thanks, pretty much everything you just said may as well be a different language but I appreciate the help, now my landing gear won’t give up when you extend them
@Aarons123 No problem! To change the direction of the bidirectional delay, we invert some of the functions:
Bool
* floor(smooth(clamp01(Bool
),Bool
? 1 /delayTime
: pow(10,10) )).
Where:
Bool
= a boolean input. For example, an activation group (Activate1)delayTime
= your delay time (seconds).
This delay behaves the way that you would expect a delay to behave. It looks the way it does to allow the smooth function to behave as we want it to.
You use a modified version of something that I call a bidirectional delay function:
ceil(smooth(clamp01(
Bool
),Bool
? pow(10, 10) : 1 /delayTime
)).
Where:
Bool
= a boolean input. For example, an activation group (Activate1)delayTime
= your delay time (seconds).
This code is the inverse of what I am used to doing, so I'm not sure if it will be right. Let me know if it works. If not, I can edit it as needed. @Aarons123 @jamesPLANESii
.
Edit: The first bool was removed as it messed up the delay.
Ah, here's the post in question.
@spefyjerbf how to make piston movement smoother?
@DwiAngkasaAeronautics No problem! I’m happy to help
@spefyjerbf thanks dude very helpful
@spefyjerbf Thank you so much I've been tearing my hair out trying to make landing gear doors. This code is perfect.
@jamesPLANESii other rotators I have that work though have it as 0
I think activation group set to 0 means that it’s disabled @Aarons123
@spefyjerbf the activationgroup was set as 0, I’m pretty sure that’s default
@Aarons123 Thats odd. What do you have set as the activation group? Not as the input, but the activationgroup field.
@spefyjerbf I removed it and now the piston doesn’t retract at, I changed the start to this, clamp01 * ceil, with the rest the same
@spefyjerbf I copied the exact formula from your pinned comment and there’s still no delay
@Aarons123 Ah, I think my code is a little off. Try removing the first activate2, and see what happens.
@spefyjerbf oh sorry it turns out I didn’t read properly as well, I need it to have a delay once Act2 is turned of, but not have a delay once it is turned on. Now this is just getting confusing
@Aarons123 ah! put a clamp01 around the first
Activate2
. That should make the delay work upon deactivation. Hopefully, at least.@Aarons123 Do you need the delay when you activate, or deactivate?
EDIT: wait. next time I should read the entire comment. one sec
@spefyjerbf Ik it’s been like 30 years but I’ve tried using the first formula on a piston to do piston things, this is exactly what I put as the input, Activate2 * ceil(smooth(clamp01(Activate2), Activate2 ? pow(10, 10) : 1 / 3 )). I can’t tell what I’ve done wrong but there’s no delay. Thanks for your help again
@spefyjerbf thanks, pretty much everything you just said may as well be a different language but I appreciate the help, now my landing gear won’t give up when you extend them
Lol, you are saved
Life saver :D @spefyjerbf
@spefyjerbf also thanks, is there anyway to make it do the opposite, delay once activated but no delay when not?
Thanks! :D @spefyjerbf
Alright so basically
You just do
Yes please someone answer this so I can steal it and use it myself