hey guys, im sorry if this is in the wrong place, or isnt possible, or has already been made(cant find it if it has)... i just got my facepunch account..
well, here is my idea:
It would be a gun that if shot..would make all the props in a certain distance around you levitate off the ground...and when the trigger is pressed again, all the floating props would be hurled in the direction of your crosshairs, kinda like the gravity gun, but it would be able to hold and throw many more items at once
I have a friend who's really competent for this kind of SWEP and he likes the idea too. He says he'll make it.
Awesome!
[QUOTE=vong888;21060577]Awesome![/QUOTE]
I've sorta already done part of this with the code in my Charmed Telekinesis pack.
The problem with constant levitation, is because the object is levitating, its point of reference will have moved in relation to the world.
So, to make that work, you need to store the props origin location as a variable on each object.
You would need to add each object to a table too, so they can all have the code executed on the think function.
eg
[LUA]
object.OriginLoc = object:GetPos() -- This stores the current objects location.
[/LUA]
Then, on the Think function for the weapon, you could have
[LUA]
for _,obj in pairs(tableof.objects) do
levitationloc = obj.OriginLoc + vector(0,0,300) --This sets the location that the object will try to levitatie towards (gravitate towards - 300 units above its current location)
//Then you need to get the objects postion, and then work out a velocity required to pull the object towards that point, and apply it via getting the physics object, and then applying force center on that object to get it floating towards that point.
end
[/LUA]
If you didnt store the origin location, your props would continuously float upwards, never ending.
This is just a sorta 'starting' location for you, or anyone else who wants to build it.
anyone made any progress on this?
Sorry, but it has been five days and it is a free mod. I don't think rushing anything is a choice.
In the other hand, learning to code is not hard. Just monotonous.
Sorry, you need to Log In to post a reply to this thread.