TeamSpen210 / HammerAddons

Useful tweaks and content for Source Engine Games
123 stars 36 forks source link

comp_numeric_transition incorrectly stops after only 40% done #265

Open TPEcool opened 4 months ago

TPEcool commented 4 months ago

I am trying to set up a comp_numeric_transition to make an elevator (func_tracktrain) speed up. Before updating HammerAddons, comp_numeric_transition worked fine for speeding up but not slowing down. Now, when the Start Value keyvalue is 0 and the End Value keyvalue is 1, the comp_numeric_transition stops at roughly 0.4 and then triggers its own EnableRefire input, which i guess indicates it considers itself ready, which it is not.

Only by setting the ending value to a higher number (e.g. 3) i was able to get proper elevator acceleration / speed up. I'm not sure if the deceleration issue is fixed in the new version. If it isn't, i will create a new issue.

TPEcool commented 4 months ago

image Here's a screenshot of the I/O it sends to the tracktrain

vrad-exe commented 4 months ago

Oh I actually noticed this the other day when trying to use it with a light pattern input in PEE, I just figured it was toggleable lights being buggy and gave up and reverted it to how it was before

TPEcool commented 4 months ago

Created a separate issue for deceleration bug mentioned here: #266

TPEcool commented 4 months ago

Confirming it stops at 40% specifically, when the end value is set to 3, it ends at about 1.2, which is 40% of 3.

TeamSpen210 commented 4 months ago

What mode do you have it set to? Note that the start/end value is always a "position" value, then depending on the mode it might output a velocity instead. If you set it to speed, it might be expecting to adjust the speed of the train so it moves 1 unit, explaining the small speeds. Also, I did make a example map showing a few ways to use this ent.

TPEcool commented 4 months ago

What mode do you have it set to?

It's set to "Adjust Velocity".

it might be expecting to adjust the speed of the train so it moves 1 unit, explaining the small speeds

The previous version of HA worked fine. I am using floats between 0 and 1 because func_tracktrain's SetSpeed input accepts a range of 0-1.

TPEcool commented 4 months ago

In the current version, "instantly set" seems to work for this purpose