numgun wrote:
Kay, need some help again. This is for the BLAME! mod primarily, but other people might find this useful for their own purposes.
So the point is this: Gun fires projectile, projectile returns to firer by moving or gravitating towards it. And if within range of 20 pixels of the firer, make the projectile dissappear.
So its like a lucky boomerang. You throw it and it always comes back at you after a short delay.
If you made a boomerang firearm that fires a boomerang mopixel or whatever damages people, you could make it come back by creating a timer when it is made and applying a forward force with a weaker spiral based on how close the timer is to a number. If it's over a number, apply a force toward the actor based on how high it is(thus getting a strong throw, gets weaker, turns around and is guaranteed to fly back because it gets stronger so it'll go through terrain).
Then you could just make it add a copy of the weapon to the actor's inventory if the actor is within 20px. I'd make it if you could make the non-lua parts I mentioned.