5.11 Pausing on Patrols Slider

When exporting the maxIdleTime variable, I wanted to use an int instead, but Godot doesn’t make a slider for that variable. I also tried using a float with an increment of 1, but that doesn’t work either. Is there a way of getting a slider for an increment of 1?

[Export(PropertyHint.Range, “0,20”)]
private int maxIdleTime = 6;

Sorry for the delayed response; we had a bit of a mix-up behind the scenes on this question.

This appears to be by design, as the Engine Contributors have been facing a bit of a dilemma regarding exactly what to do with it, and as a result, the issue has been in limbo for years.

Fortunately, there’s still something you can do in the meantime. Please have a look through this post; feel free to read through it for a history if you like, but you should find your answer in the “quick and dirty workaround” commented by dog-on-moon on April 13th 2024.

Basically, you can cast a float as an int after the fact, and as long as you don’t use a step value of exactly 1, it should work the way you expect it to.

1 Like

Weird. Well, a solution is a solution. Thanks

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms