How could I scale a prop_sphere and keep the spherical collision area and use ENT:StartTouch() to see if something enters it?

Perhaps set up an entity function with **[Ents.FindInSphere](** and use a timer to run it every x amount of seconds?

My goal with this is to prevent me from having to do anything like that because it would have to happen often.

[editline]26th January 2011[/editline]

It also is invisible so it doesnt matter what it looks like, only that it Triggers ENT:StartTouch() in a spherical area.

[editline]26th January 2011[/editline]

Ok, well is there anyway at all to get an entity to call StartTouch() with a sphere, then thats what Im looking for.

I was just reading the valve wiki, and it shows a keyvale for it called radius, try this after you create the prop_sphere.
ent = ents.Create(“prop_sphere”)
ent:SetKeyValue(“radius”, 100) – 100 or whatever your radius needs to be

I’ve been working on a trigger_teleport rewrite and have been using keyvalues a lot so the FDG on the page shows this entity has a radius key.

May work, may not

The problem with that is I cant make a custom entity out of it.

Well that’s ok, I just tested it and it will not resize, and after re-reading the wiki there’s a code modification need to allow it to use the radius.


Tried that. It failed because my entity had to not be solid for what I am doing.

Touch() is triggered by the coalition model, its not solid, so it has no coalition model, it wont work. You could just make an entity, then use FindInSphere() in its think. Would do pretty much the same thing you want.

I am aware freemmaann, I just am trying to stay away from anything that could slow this down more than it has to. If I can get this to work it would be far less expensive and instantaneous compared to FindInSphere().

I asked for the radius function for the prop_sphere in the niggles section, it might be useful to be able to resize it, but looking at the code from the wiki page it looks like it does exactly what the Entity.PhysicsInitSphere but with c++ instead of Lua. So there may not be a better option, but good luck.