Where is the bouncy ball in files?

Hey guys i am helping a friend with a gamemode and what to know what the bouncy ball is under?

Its hidden in the garry’smod GCF file under lua, let me go check to see if I can find it…

EDIT: hmm, couldn’t find the bouncy ball, but I did find these on garry’smod.org http://www.garrysmod.org/downloads/?a=view&id=7637

Download gcfscape,open garrysmodcontent.gcf,go to the addons folder,default sent pack,and then drag n drop it in your addons folder,here you go,modify it as you like.

Also,don’t upload your modified version on garrysmod.org,this should remain a secret :ssh:

Wow, how did I miss that?



Where does it say about the model :open_mouth: ?


Wait i think i no would you do
local bob = ents.Create( “sent_ball” )


i need to turn it into a soccer ball i need the bouncy bit :stuck_out_tongue:
can someone help me take the colours of and set the model

The bouncy ball has no model(Well it has one but it only uses it for the shadow). It’s actually simulating the physics of a sphere and it’s model is a sprite.

So to make your soccer ball you would change it’s model in init.lua to your soccer ball and replace all of cl_init.lua with this :


function ENT:Draw()

draw model i put the model?


function ENT:SpawnFunction( ply, tr )

if ( !tr.Hit ) then return end

local SpawnPos = tr.HitPos + tr.HitNormal * 16

local ent = ents.Create( "sent_ball" )
	ent:SetPos( SpawnPos )

Would i set it as ent:SetModel?? btw thats in init.lua

Here are the files to the ball. You’ll want to recreate them with a different folder name then sent_ball.

Then open cl_init.lua and replace it with this :

function ENT:Draw()

Then open init.lua and go to line 35 (first useful line in ENT:Initialize() ) and change the model that’s being set :
self.Entity:SetModel( “models/Combine_Helicopter/helicopter_bomb01.mdl” )

Change that to your soccer ball model.

Ok thanks a million!


Also how would i go about spawning it in the map?
would i do it in the init.lua of the gamemode folder?


and do it like this like you would spawn a npc?
bob = ents.Create( “sent_soccerball” )
Like that?

You can also use this site http://luabin.foszor.com/code to browse default lua files.

If you install it properly and set it’s spawnable and adminspawnable properties to true you can spawn it from the spawn menu, if it’s not available you can use what you posted in your script or simply use a console command, here’s an example :

local function SpawnSoccer( ply )

local tr = ply:GetEyeTrace() // Trace to where the player is looking 

if !tr.HitWorld then return end // If it hit anything else then the world (ground) stop execution

bob = ents.Create( "sent_soccerball" )
bob:SetPos(tr.HitPos) (Set it's pos where the trace hit)


concommand.Add( “soccer”, SpawnSoccer )[/lua]

Wrote in the reply window so no warranty. :smile: