• Surfaceproperties of Bouncy Ball?
    6 replies, posted
Just wanted to ask a quick question, what surfaceproperties does the bouncy ball use? Since I am unable to add in surface properties, that's the closest to what I need. But I have no idea what it uses!
You can literally just look up the source code for it yourself: [url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/entities/sent_ball.lua[/url]
I had no idea where the ball was. I checked models, but I couldn't see it. Hmm, it seems to suggest it's metal_bouncy, though the balls don't sound metal, and that surfaceprop is not nearly as bouncy as the balls themselves?
[QUOTE=kizzycocoa;48772318]I had no idea where the ball was. I checked models, but I couldn't see it. Hmm, it seems to suggest it's metal_bouncy, though the balls don't sound metal, and that surfaceprop is not nearly as bouncy as the balls themselves?[/QUOTE] You mean that bounce? [URL="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/entities/sent_ball.lua#L96-L119"]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/entities/sent_ball.lua#L96-L119[/URL]
[QUOTE=Coffeee;48772621]You mean that bounce? [URL="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/entities/sent_ball.lua#L96-L119"]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/entities/sent_ball.lua#L96-L119[/URL][/QUOTE] Ah, so it's lua code that does that. Is there any way to make it apply to specific props_physics props? I have a prop_physics I want to give these properties to, but I don't know any lua coding at all!
[QUOTE=kizzycocoa;48772785]Ah, so it's lua code that does that. Is there any way to make it apply to specific props_physics props? I have a prop_physics I want to give these properties to, but I don't know any lua coding at all![/QUOTE] get the entity object of that specific prop, and apply the function to it.
[QUOTE=whitestar;48772813]get the entity object of that specific prop, and apply the function to it.[/QUOTE] I literally have no lua coding experience at all, so I've no idea how to do that. :S The most lua experience I've had is trying to get my addons to work in the Gmod environment, with particles, downloading workshop items etc. What I need to know, is what do I do to that code to make it apply to, for example, "models/kizzycocoa/prop_ball.mdl"? do I just cut out the highlighted section, reword it, and put it into a lua folder? will that auto-run? Also, will that work in other gamemodes, such as Murder, TTT and Slender?
Sorry, you need to Log In to post a reply to this thread.