Wednesday, September 30, 2009

Prop spawners, wheels, and hydraulics explained

Okay, I've seen in the search results that some of you are looking on how to use prop spawners, while others are trying to make bi-directional wired wheels. Both are actually pretty simple:

Prop spawners (wired):

During the week, I don't usually have access to GMod, so I might make a few mistakes, but here is what I remember:

-Prop spawners have a variable spawn rate, and this is set when you make one. A higher number means it spawns slower, while a lower one makes it spawn faster. This is caused by the spawn "delay". The delay is how many seconds it takes for it to refresh and spawn a new prop.
-One of the two inputs is spawn. Kinda self explanatory, when the value is greater than zero (0), it will spawn a prop.
-The other input is Undo. This is also self explanatory, it removes the props so you don't have to furiously mash your Backspace (or whatever your Undo key is) key and risk deleting something else.

Wired wheels:

To make a wired wheel go both ways, you simply have to make it have a negative input for one way and a positive for the other. I usually do it like this:

-Spawn an Add gate, a Negate gate, and a wheel.
-Wire the A of the add to the button/whatever makes it go forward.
-Wire the A of the Negate to the thing that makes it go backward.
-Wire the B of the Add to the Negate.
-Wire the Wheel to the Add.

Done, simple as that. You can also use this method for thrusters or even hoverballs (ZVelocity to the add).

Hydraulics:

Hydraulics are fairly simple once you get the hang of them. Fixed hydraulics can be used as sliders or to constrain a prop to move only in one direction.

To smooth/slow hydraulics down, you just need a Smooth gate (Gate - Time) and a constant value. Wire the A of the Smooth to the value that you would normally wire the Length of the hydraulic to, and wire the Rate to the Constant Value. The higher the Constant Value is, the more it gets 'smoothed', and the slower it is. Good for doors which are supposed to close slowly instead of chopping people in half, as has happened to me many of times...

I'll occasionally see what people are having problems with, and I'll try to make more of these in the future. If you have any questions/suggestions, Email me at Narcotic.Clown@Gmail.com.

No comments:

Post a Comment