View unanswered posts | View active topics It is currently Thu Mar 28, 2024 6:27 pm



Reply to topic  [ 7 posts ] 
 I need a script that will pull things to a certain vector. 
Author Message
User avatar

Joined: Sat Nov 18, 2006 8:11 pm
Posts: 266
Reply with quote
Post I need a script that will pull things to a certain vector.
I don't know Lua, and I don't want to learn it all for this weapon because it will take a while to learn. The fact is for that this weapon I need someone to make the script for me.

I am making a weapon for a giant actor. The giant actor has giant fists. So I figured, "hey, wouldn't it be awesome if I could grab stuff with my fists and crush it?"

Which brings me to where I am now. I have made a weapon that looks like a big arm and fist, it all looks nice and whatnot. I have it set up so that holding down fire provides a crushing effect inside the hand. Now all I need is an Lua script that will allow me to press a button and have things in a small radius be sucked into his hands. So, could someone make a script where in a 15 pixel radius, everything is sucked to the center? (IF POSSIBLE USE AN EFFECT THAT DOESN'T REQUIRE CHECKING ALL THE BODIES IN THE MAP, IT GETS WAY TOO LAGGY) Also, how would I set the effect to be in his hand?

Just assign it to F or something, I can always change it later. Thanks in advance! I love you all <3


Last edited by Foogooman on Tue Jul 07, 2009 9:29 pm, edited 1 time in total.



Tue Jul 07, 2009 7:45 pm
Profile WWW
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: I need a script that will pull things to a certain vector.
Foogooman wrote:
IF POSSIBLE USE AN EFFECT THAT DOESN'T REQUIRE CHECKING ALL THE BODIES IN THE MAP, IT GETS WAY TOO LAGGY

Impossible, unless you want to grab only one thing at a time.

But there is currently existing gravity code. Just use my attachable hack to find the arm postion, and gravitate stuff to the hand if the distance(since your in lag land, I would recomend using a box instead of a cirlce).

TLB made a nice gravitatemovableobject code. GodlyDesent(Mode contest entry) uses it, my gravity hook uses it, and oribt lands uses it.


Tue Jul 07, 2009 8:07 pm
Profile
User avatar

Joined: Sat Nov 18, 2006 8:11 pm
Posts: 266
Reply with quote
Post Re: I need a script that will pull things to a certain vector.
mail2345 wrote:
Foogooman wrote:
IF POSSIBLE USE AN EFFECT THAT DOESN'T REQUIRE CHECKING ALL THE BODIES IN THE MAP, IT GETS WAY TOO LAGGY

Impossible, unless you want to grab only one thing at a time.

But there is currently existing gravity code. Just use my attachable hack to find the arm postion, and gravitate stuff to the hand if the distance(since your in lag land, I would recomend using a box instead of a cirlce).

TLB made a nice gravitatemovableobject code. GodlyDesent(Mode contest entry) uses it, my gravity hook uses it, and oribt lands uses it.


Yeah, I know of that code. I didn't want to use it because of the lag though. Grabbing one thing at a time would be fine, preferable even. He wouldn't be able to fit more than one actor in his hand anyway.


Tue Jul 07, 2009 8:09 pm
Profile WWW
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: I need a script that will pull things to a certain vector.
Then use a nice CastMO ray.

Just send out two rays going though the hand and ignoring the actor. When they hit something, find the root, and in case of a conflict, choose the closest one.

Grab it, use the gravitatemo code to the hand's postion and done.


Tue Jul 07, 2009 8:50 pm
Profile
User avatar

Joined: Sat Nov 18, 2006 8:11 pm
Posts: 266
Reply with quote
Post Re: I need a script that will pull things to a certain vector.
mail2345 wrote:
Then use a nice CastMO ray.

Just send out two rays going though the hand and ignoring the actor. When they hit something, find the root, and in case of a conflict, choose the closest one.

Grab it, use the gravitatemo code to the hand's postion and done.


I don't know how to do that... :(


That's why it's in requests after all :-P


Tue Jul 07, 2009 8:51 pm
Profile WWW
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: I need a script that will pull things to a certain vector.
http://datarealms.com/wiki/index.php/Lu ... #CastMORay
http://datarealms.com/wiki/index.php/Lu ... etMOFromID

Oh, and after you get the MO, get the MO of it's root ID.
Secondly, if the MO ray finds nothing, it returns 255, so check for that.


Tue Jul 07, 2009 9:04 pm
Profile
User avatar

Joined: Sat Nov 18, 2006 8:11 pm
Posts: 266
Reply with quote
Post Re: I need a script that will pull things to a certain vector.
mail2345 wrote:
http://datarealms.com/wiki/index.php/LuaDocs/SceneManager#CastMORay
http://datarealms.com/wiki/index.php/Lu ... etMOFromID

Oh, and after you get the MO, get the MO of it's root ID.
Secondly, if the MO ray finds nothing, it returns 255, so check for that.


You just won't make this easy on me will you? :-(


Well, I guess I should learn Lua at some point, but if someone wants to make the script for me that would be appreciated too. It would speed up this process with this weapon.


Tue Jul 07, 2009 9:07 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: Google [Bot]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.043s | 17 Queries | GZIP : Off ]