-----EDIT-----
I solved my own problem. It's alright now.
-------------
Alright, so I am certainly a newbie at lua but I can learn fairly fast. I'm kicking off with a project currently called the Propulsifier (but the name won't cover all the features after I get to v2).
Link:[url]http://www.garrysmod.org/downloads/?a=view&id=104041[/url]
Now here is the issue: I got a request to make it bounce/slide other props that touch it but what I need to know is how to get it to do that. The current code I am using to move players is:
function ENT:Touch( ent )
if ent:IsValid() then
ent:SetVelocity(ent:GetForward()*self.dt.propulsion*Vector(1,1,0) + Vector(0,0,self.dt.repulsion))
end
end
Where I have users define self.dt.propulsion and self.dt.repulsion however this does not affect props. I have tried a ton of different methods just to even make a prop spaz out, but I can't get it to have a prop act upon it and then it affect that prop. Can I please just have some help getting my entity to do ANYTHING to the other prop that touches it. I don't need/want you finishing my code as I am trying to fully do this on my own after having used waterizer as a base. I know that affected entities by using some predefined method in the autorun/sh_waterizer.lua (if you want to look at that:[url]http://www.garrysmod.org/downloads/?a=view&id=89112[/url]).
I may end up using that kind of control since my next job after this is to cause players to have far smoother movement that slowly accelerates and has inertia and what not (also allowing the option of force rotation or lack of rotation or just forced orientation on a player).
Sorry, you need to Log In to post a reply to this thread.