Animation Speed
I searched for this for a while now, but couldn't find anything. I try to slow down the animation of a telescopic arm. I read a few things about SetPlayBackRate but this doesn't seem to do anything for me. I basically want that the arm elevates a cube, but the defaul speed launches the cube to the ceiling...
Can you help me? 
Jimmy wrote:
Would you elaborate on that? I tried this and it does not work.
You need to first start playing the animation and THEN use SetPlaybackRate.
For example:
Quote:
OnSomeOutput -> arm_model_1 -> SetAnimation -> animation_name -> delay 0
OnSomeOutput -> arm_model_1 -> SetPlaybackRate -> 2 -> delay 0
As for the input itself, the parameter takes a number. One is normal speed, less than one is faster, more than one is slower.
Groxkiller585 wrote:
You need to first start playing the animation and THEN use SetPlaybackRate.For example:
Quote:
OnSomeOutput -> arm_model_1 -> SetAnimation -> animation_name -> delay 0
OnSomeOutput -> arm_model_1 -> SetPlaybackRate -> 2 -> delay 0
Wouldn't I need a delay for SetPlayBackRate for it to be used after the animation started?
chickenmobile wrote:
Try a delay of 0.01
This works, thank you!
Although the cube I put on top of the panel is still being launched up and doesnt stay still. What can I do about that?
FelixGriffin wrote:
You could temporarily parent it to the panel.
I tried this but failed. Can you explain please?
Jimmy wrote:
Thanks to those who helpedGroxkiller585 wrote:
You need to first start playing the animation and THEN use SetPlaybackRate.
For example:
Quote:
OnSomeOutput -> arm_model_1 -> SetAnimation -> animation_name -> delay 0
OnSomeOutput -> arm_model_1 -> SetPlaybackRate -> 2 -> delay 0Wouldn't I need a delay for SetPlayBackRate for it to be used after the animation started?
Yh sorry, was in a bit of a rush. The delay should be about 0.05 seconds after to prevent problems (panels don't like short delays - seems to screw them up. My panel prefabs usually have a delay of attaching the brushes and a bigger one for animating, so everything settles before it's put to work, and even then rotation can still screw it up.)
As for your cube issue, why not use an invisible-textured func_brush "cage" that is set to collide only with the box (via filters) that takes up the entire space around the panel, and you enable it when the panel goes up and when it stops disable it.
If the cube has no unique name for a filter, you can specify it by model instead. (This is how one can distinguish between normal cubes, reflecto-cubes, and spheres, because they all come from one entity, so filtering the class wouldn't work.)
Quote:
Yh sorry, was in a bit of a rush. The delay should be about 0.05 seconds after to prevent problems (panels don't like short delays - seems to screw them up. My panel prefabs usually have a delay of attaching the brushes and a bigger one for animating, so everything settles before it's put to work, and even then rotation can still screw it up.)As for your cube issue, why not use an invisible-textured func_brush "cage" that is set to collide only with the box (via filters) that takes up the entire space around the panel, and you enable it when the panel goes up and when it stops disable it.
If the cube has no unique name for a filter, you can specify it by model instead. (This is how one can distinguish between normal cubes, reflecto-cubes, and spheres, because they all come from one entity, so filtering the class wouldn't work.)
Thanks. Main problem about the "cage" is that the cube is basically launched straight up, and since I can't put a texture that collides with the cube right on top of it (because then the cube wouldn't move up at all?) this won't work. Unless... parent the invisible texture to the panel..?
Jimmy wrote:
Quote:Yh sorry, was in a bit of a rush. The delay should be about 0.05 seconds after to prevent problems (panels don't like short delays - seems to screw them up. My panel prefabs usually have a delay of attaching the brushes and a bigger one for animating, so everything settles before it's put to work, and even then rotation can still screw it up.)
As for your cube issue, why not use an invisible-textured func_brush "cage" that is set to collide only with the box (via filters) that takes up the entire space around the panel, and you enable it when the panel goes up and when it stops disable it.
If the cube has no unique name for a filter, you can specify it by model instead. (This is how one can distinguish between normal cubes, reflecto-cubes, and spheres, because they all come from one entity, so filtering the class wouldn't work.)
Thanks. Main problem about the "cage" is that the cube is basically launched straight up, and since I can't put a texture that collides with the cube right on top of it (because then the cube wouldn't move up at all?) this won't work. Unless... parent the invisible texture to the panel..?
No I mean build the cage so it's top is where the cube's top will rest.
Like so:

Another, probably better option is to merely parent the cage to the panel top (making it as small around the box as possible within a decent gridsize), that way the box isn't shot up then suddenly stops for no visible reason.
http://www.youtube.com/watch?v=ykTfvZ4Ak2M
Jimmy wrote:
That's what I basically did. Problem: http://www.youtube.com/watch?v=ykTfvZ4Ak2M
lol it jiggled...
The falling was because you disabled it too quickly. The jiggling is because you gave it too much space (or too little). Try fixing both and see if that helps.
@letsplay: That would work ,but vphysicsclip can't be parented, so if he's using the parenting way he has to use a func_brush. (Also, I use the "CLIP" texture for vphysicsclip, not "NODRAW". I don't think it matters much but it did fix some bugs I had.)
Groxkiller585 wrote:
The falling was because you disabled it too quickly.
Nothing's being disabled at that point...
This is harder than I thought... :/ What's going on now? Video:
http://www.youtube.com/watch?v=P3cehk-ppKM
Jimmy wrote:
Groxkiller585 wrote:The falling was because you disabled it too quickly.
Nothing's being disabled at that point...
This is harder than I thought... :/ What's going on now? Video: http://www.youtube.com/watch?v=P3cehk-ppKM
This isn't you, this is lasers. The box will do that because it "freezes" when it's firing a laser. If you tell it to EnableMotion when it falls it will stop doing that. (ie put a trigger up there, turn it on briefly (WITH A DELAY, preferably 0.10) when the panel goes down, make it tell !activator to EnableMotion, then turn it off again.)
Wait, so your telling me it fell off, but the cage wasn't disabled?
Can you isolate this bit of the map and send it to me so I can have a look?
Also if you think this a bit ridiculous for one small thing to work, welcome to Hammer, where everything is overcomplicated to the extreme! 
Keep in mind, I'm a noob.
Quote:
Wait, so your telling me it fell off, but the cage wasn't disabled?
Yes...
Quote:
Also if you think this a bit ridiculous for one small thing to work, welcome to Hammer, where everything is overcomplicated to the extreme!
Thats just great..^^
Jimmy wrote:
Isolated part of the map: https://www.dropbox.com/s/4wyak7y0lx8y9pr/cut.vmfKeep in mind, I'm a noob.
Quote:Wait, so your telling me it fell off, but the cage wasn't disabled?
Yes...
Quote:
Also if you think this a bit ridiculous for one small thing to work, welcome to Hammer, where everything is overcomplicated to the extreme!
Thats just great..^^
I have no idea why, but attempting to load this vmf causes hammer to crash at 5 percent every time. Can you load this snippet?