IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> [Garry's Mod] Advanced Slider Tool
GiGaBiTe
post Jun 27 2015, 10:48 AM
Post #1


Administrator
***

Group: Super Administrators
Posts: 46
Joined: 16-June 10
Member No.: 1



Garry's Mod used to have a really nice slider tool... back in version 9, which was in 2005. It had the limitation of being fixed in the world (you couldn't move the slider and entity hierarchy around) but it worked and was stable.

That all changed when version 10 was released in 2006. Unlike in Garry's Mod 9, where the slider tool made a real phys_slideconstraint, the new tool simulated the slider. Since it was so badly implemented, sliders with the new tool have been very unstable, often resulting in floppy sliders or sliders that flail about for seemingly inane reasons.

In a recent coding spree to fix some old tools, I once again found myself irritated with the simulated sliders and decided to try and make an alternative. What I came up with is rather primitive by today's standards of Gmod tools and fancy GUIs, but it gets the job done.

Here's a shot of the tool menu:


Unlike the normal simulated slider (and even the old Gmod 9 tool), you have pretty much the full range of options that the phys_slideconstraint allows.

"First Entity" and "Second Entity" are the names which the two sliderd props are named. It's best that you change the default names to something else as they're globally shared on the server, so other people could technically mess up your sliders if they accidentally used the same names. I'll try to fix this in a later version so each person gets unique names that don't interfere with each other. Also remember that you need to change the names if you're making more than one slider.

"Slider Axis" is a vector in X Y Z format from the slider origin which tells the slider which direction the slider should run. It also tells the slider how long it should be if you choose to use one of the "Limit Endpoints" spawnflags. The vector is always relative to the world and not the player view, so it won't change based on where the player is looking. "0 0 90" would make the slider 90 units long and point up, 0 0 -90 would be the reverse and point down. Other values would point in back, forward, left, right directions, or in arbitrary directions if you start mixing the values.

"Slider Friction" sets how much friction a prop moving along the slider should have. Lighter props need less friction to slow them down, while heavier props need more. Don't be alarmed if you have to use values in the thousands to see any sort of resistance on a heavy prop.

"Spawn Flags" set how the slider should behave.

- "collide" is normal behavior where it collides with the world.
- "limit endpoints" will limit the amount of travel along the slider to the length specified in "slider axis". So if you specified 90 units, the slidered prop would stop when it reached that distance.
- "no collide until break" will make the prop non-solid to the world until the slider breaks (or is removed.)
- "no collide until break and limit endpoints" will both make the prop non-solid to the world and limit the travel of the prop along the slider.

"Slider Force Limit" This is the number of pounds of force required to break the slider. Setting it to 0 will disable the setting.

"Slider torque Limit" This is the number of pounds of force times the distance of the slider (lbs*dist) required to break the slider. Setting it to 0 will disable this setting.

"Break Sound" Is the sound that will play when the slider breaks. You can use any sound in sound script format (like the example in the screenshot) or in path/file style. The total number of characters in the path can't be more than 80 though.

"Teleport Follow Dist" is broken and will probably be removed in a future version.

DOWNLOAD
This tool is included in my Propeller Model Pack, which can be downloaded here:
http://sanzen.in/forums/index.php?showtopic=2
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 16th August 2017 - 11:32 AM