I've been trying (and utterly failing) at building off of Doc's Holographic Iris Starfall to create something a little like this:
Gears (from Doc's holo iris) will rotate at the same speed as the glyphs on an SG-1, Movie, Infinity, etc. gate, or at the speed that a Universe gate rotates. I've even tried making the simplest form of this idea (gears rotating at a fixed speed when the glyphs/gate rotates at all), but, being Starfall-illiterate, can't seem to get anything to work. A problem I've seen with this idea is that there's only a Wiremod input for "Rotate Ring," which is a normal input, but no output for how fast the ring is rotating. Could a Starfall/E2 be able to detect how fast a ring is rotating?
If he finds this I'll be overjoyed.
spongeboy me bob, i am making funny spaceships in garry mod!!! agagagagagag
The ring is a separate entity, starfall has stargate functions to get the ring's angle but not its actual speed ( at least I didnt try searching )
If I get on at some point, i'll test this and try to make your idea.
The17thDoctor: Server take me to the most handsome person srcds_linux: I cant send people to themselves...
(19-07-2020, 11:36 PM)The17thDoctor Wrote: The ring is a separate entity, starfall has stargate functions to get the ring's angle but not its actual speed ( at least I didnt try searching )
If I get on at some point, i'll test this and try to make your idea.
Thanks Doc! I'll get on as soon as possible. [ After I'm done watching anime and playing Minecraft at the same time. ]
spongeboy me bob, i am making funny spaceships in garry mod!!! agagagagagag
if (self.RingSpeed == 1) then
self.Ring.Entity:SetKeyValue("maxspeed",30);
elseif (self.RingSpeed == 2) then
self.Ring.Entity:SetKeyValue("maxspeed",45);
pitch = 102;
elseif (self.RingSpeed == 3) then
self.Ring.Entity:SetKeyValue("maxspeed",60);
pitch = 106;
elseif (self.RingSpeed == -1) then
self.Ring.Entity:SetKeyValue("maxspeed",7.5);
pitch = 93;
else
self.Ring.Entity:SetKeyValue("maxspeed",15);
pitch = 95;
end
used to set a rotating function on the ring
Code:
function ENT:AddRing()
local pos = self.Entity:GetPos();
local e = ents.Create("func_rotating");
e:SetKeyValue("spawnflags",4 + 16); -- rotate around x-axis
e:SetKeyValue("rendermode",10); -- dont draw,or the game crashes on touch
e:SetKeyValue("maxspeed",30);
e:SetKeyValue("friction",100);
Note: These formulas get called every 0.1 seconds.
Purpose: Think function: Accelerates a func_rotating to a higher angular velocity. new_speed = fabs( current_speed ) + 0.2 * maxspeed * fanfriction;
Purpose: Decelerates the rotator from a higher speed to a lower one. new_speed = fabs( current_speed ) - 0.1 * maxspeed * fanfriction;
So there's an acceleration from when the ring start rotating until it reached the specified max speed (in deg/s) taking 400ms to reach max speed