I'm a begginer to Lua for Gmod and I'm currently trying to make a "Black Hole Gun", which fires a rocket that explodes after 1.5 seconds and creates a black hole that sucks all props and players into it and finaly dissolving them (env_entity_dissolver). I created a function called ENT:Detonate() on the init.lua of the Rocket Entity which supposedly spawns a point_push with negative magnitude (which logicaly would pull instead of push). But it didnt work, and I didnt get any error messages...
What would be the best way to do this?
Thanks is advanced
FiskB
[url=http://www.garrysmod.org/downloads/?a=view&id=31039]Look at how mahalis did it.[/url]
[lua]
( Vector1 - Vector2 ):Normalize()
[/lua]
?
You just need a SENT, and in the Think hook check for entities in a radius. After you have that loop through and apply forces to the objects toward the center of the SENT.
At that point you are half done
Sorry, you need to Log In to post a reply to this thread.