Can a func_door_rotating rotate for 31,709 years?

Bombcartography

L1: Registered
Aug 28, 2013
25
7
func_rotating has apparently never worked in TF2. There are various workarounds I found on the Internet like using a func_physbox tied to a phys_motor. Works nice but the phys_motor can't be parented.

For what I wanted, just having the thing spin several times one direction, then the other direction would work. So I made a func_door_rotating that spun 360 degrees per second. I set the distance to 3600 so it spun ten times.

But then I thought, why not 36,000 so it could spin 100 times? How about a distance of 360,000? 3,600,000? 360,000,000,000? And so on.

I stuck 360,000,000,000,000 in it and ran the map. Seems to work fine in game. At least for five minutes. I don't have the patients to wait 30,000 years.

But I'm wondering is there an upper limit on distance and the door will stop way short of 30 millennia?
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
momentary_rot_button with a timer, remap and a counter
timer set to refire every 0.1 seconds say
timer adds 1 to the counter
counter sends outvalue to remap which remaps from 1 to 100, to 0 to 1
remap sends outvalue to momentary_rot_button as setposition
counter sends setvalue 0 to itself every time it hits max value

infinite loop without worrying about number sizes.


(counter only deals in ints, remap only accepts ints but can spit out floats, momentary rot button only accepts floats between 0 and 1 as positions. Hence the need for the counter and the remap)
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
My assumption would be that it uses a signed 32 bit integer for the key, so the limits would be -2147483647 to +2147483648 (yes, rotators can have a negative angular distance)

Doors work fine usually though. Something would have to be spinning faster than it is worth (i.e. indistinguishable from slower) to really run into the issue in a multiplayer round duration.

MRB works when you need to arbitrarily stop/start it. http://forums.tf2maps.net/showthread.php?t=4107 (and could be set up with "mirror" relay for reverse direction) ...not to doubt my own post, but it seems like there should be an even easier way, but TF2 wants to update so I can't try it out right now.

YM's implementation seems to be missing a couple points, because it wouldn't smoothly transition between rotations without a SetPositionImmediately somewhere.